Support the ongoing development of Laravel.io →
Authentication Security Requests
Last updated 2 years ago.
0

It could be built as a route filter, but i would say the best an easiest way is to make a grouped route with auth-filter and simply put all routes except for auth related stuff there.

Last updated 2 years ago.
0

And here's the code

Route::group(['before'=>'auth'], function() {
	// put your routes here
});

Route::get('login', function() {

});

Route::get('register', function() {

});
Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

TehHector tehhector Joined 31 Jul 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.