Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save rajucs/ec10fa285dfe7b647237bdde4a08c24f to your computer and use it in GitHub Desktop.

Select an option

Save rajucs/ec10fa285dfe7b647237bdde4a08c24f to your computer and use it in GitHub Desktop.
Redirect Authenticated user after login to custom url in laravel or laravel 6
Goto app\http\Middleware\RedirectIfAuthenticated.php
add this function
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->check()) {
return redirect('/admin/dashboard');
}
return $next($request);
}
instead of your previous handle function.
THants it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment