using the php artisan make:auth method I run into the problem that once I use route protection by 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 it gives me the error
NotFoundHttpException in RouteCollection.php line 161
I tried to follow up with the Go to... and got to the Authenticate class but there I stay and I can't find the login redirect to change it
From what I read it is different from the other 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);
}
I tried returning a view if false comes out of the check but no result
Since it's different in Laravel 5.3, that route is now modified in the ExceptionHandler :
app\Exceptions\Handler.php