Before L5, in L4 i had a few filters for AUTH like:
Route::filter('guest', function() {
if (Auth::check())
return Redirect::to('/login');
});
Route::filter('auth', function() {
if (Auth::guest()) {
Session::put('redirect_after_login', Request::url());
return Redirect::to('/login');
}
});
In my Routes.php all routes was in two groups: with and without auth filter. How now do this? Should I include $this->middleware('auth'); in each controller or may somehow specify the same two groups?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community