Answer the question
In order to leave comments, you need to log in
How to completely move authorization in Laravel 5.5 to a prefix?
Connected the authorization mechanism to the site
php artisan make:auth
Route::group( ['middleware' => ['web'] ], function () {
Route::group(['prefix' => 'user', 'middleware' => ['auth']], function () {
Route::get('/home', '[email protected]')->name('home');
});
});
Answer the question
In order to leave comments, you need to log in
Try like this:
Route::group( ['middleware' => ['web'] ], function () {
Route::group(['prefix' => 'user'], function () {
Route::get('/login', '[email protected]')->name('login');
Route::group(['middleware' => ['auth']], function(){
Route::get('/home', '[email protected]')->name('home');
Route::get('/logout', '[email protected]')->name('logout');
});
});
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question