dimanche 19 avril 2020

Laravel protecting routes with verified middleware not working

I've implemented Laravel-5.8 email verification following this tutorial: https://laravel.com/docs/5.8/verification. I'm trying to protect few routes from email unverified users as like below:

Route::group(['middleware' => ['verified']], function () {
    Route::get('/dashboard', 'DashboardController@dashboard')->name('dashboard');
    Route::get('/backend', 'DashboardController@backend')->name('backend');
});

But I can access to dashboard without verifying my email address.

How can I prevent this access without verifying email?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire