You don't need to add the middlewares in app.php
Try to remove the verified middleware and test if it works.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
hello , I created a laravel 11 project . I added laravel breeze with blade to laravel . it created the login page , and authenticated . but when I am redirected to the dashboard I am sending back to the login page .
I checked this method , it is ok -
public function authenticate(): void
{
$this->ensureIsNotRateLimited();
if (! Auth::guard('web')->attempt($this->only('email', 'password'), $this->boolean('remember'))) {
}
if I give a dd there , I will see that is attempting the login correctly with the user and password . ok , now goes to the next step .
that is to redirect to the dashboard -
return redirect()->intended(route('dashboard', absolute: false));
and in the route is restricting like that , with the middleware -
Route::get('/dashboard', function () {
return view('dashboard');
})->middleware(['auth', 'verified'])->name('dashboard');
I had a look , and it does not have inside the /bootstrap/app.php those middlewares . breeze didnt created to me . do I have to create that ?
my middleware is empty _
->withMiddleware(function (Middleware $middleware) {
$middleware->alias([
]);
})
You don't need to add the middlewares in app.php
Try to remove the verified middleware and test if it works.
Please or to participate in this conversation.