I installed the adminlte theme and I want to create an admin area. So my url should look like :
/admin = admin home page dashboard
/admin/login
/admin/register/
This is my route so far:
Route::group(['middleware' => 'auth'], function () {
Route::get('/admin', ['as' => 'admin', 'uses' => 'Admin\DashboardController@index']);
});
When I access the /admin page I am redirected to /login instead of /admin/login
The redirection is made from here:
vendor/laravel/framework/src/Illuminate/Foundation/Exceptions/Handler.php
in the unauthenticated method
I followed up the answer from here: Laravel 5.5 change unauthenticated login redirect url ,but i ended up with this error:
Declaration of App\Exceptions\Handler::unauthenticated($request, App\Exceptions\AuthenticationException $exception) should be compatible with Illuminate\Foundation\Exceptions\Handler::unauthenticated($request, Illuminate\Auth\AuthenticationException $exception)
Any idea how do I change my redirect url ? Thank you
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire