Laravel Breeze Login Conditional Redirect
When you want to redirect a user after login according to their role, and using Laravel Breeze
✅ Checked works with Laravel 10
public function store(LoginRequest $request): RedirectResponse
{
$request->authenticate();
$request->session()->regenerate();
//return redirect()->intended(RouteServiceProvider::HOME);
return redirect()->intended(
auth()->user()->is_admin ? route('admin.dashboard') : route('dashboard')
);
}Intended route
Fortify + Jetstream
Last updated