using the php artisan method make: auth I run into the problem that once I use route protection doing
route::group(['prefix'=>'admin', 'middleware'=>'auth'], function(){...}
When I want to enter a protected route, it redirects me to / login but I have changed the route to login, so I get the error
NotFoundHttpException in RouteCollection.php line 161
Try to follow up with the Go to .. and get to the Authenticate class but there I stay and I can not find the redirect to login to change it
For what I read it is different from the others laravel 5. I guess I have to modify the handle () of RedirectIfAuthenticated
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->check()) {
return redirect('/');
}
return $next($request);
}
probe returning a view if the check is false but no result