Middleware auth did not work.

Last modified on August 23, 2019 20 sec read

It’s a crucial part laravel project. It needs to check to protect my path of laravel.

In routes->web.php here I declare all my path link, for best practicing I use route grouping.

Route::group(['prefix' => 'example', 'middleware'=>'auth'], function () {
   Route::get('/', '[email protected]')->name('example');
 });

But the problem I face it did not check any authentication. The solution I found that is, go to your

Here is Folder structure:

app->Exceptions->Handler.php

then you just this this class 🙂

use Illuminate\Auth\AuthenticationException;

You're welcome to suggest any article to write!

Leave a Reply

Your email address will not be published. Required fields are marked *