i am using laravel 5.1.8. i am making a login/registration system. i made a controller named AdminController and protect it with middleware.
but i am using laravel\'
go to
App\Http\Middleware\RedirectIfAuthenticated
then change it from
public function handle($request, Closure $next)
{
if ($this->auth->check()) {
return redirect('/home');
}
return $next($request);
}
to
public function handle($request, Closure $next)
{
if ($this->auth->check()) {
return redirect('/admin');
}
return $next($request);
}