Answer the question
In order to leave comments, you need to log in
How to make routing for two types of users in Laravel 5?
route.php
Route::get('user/login', '[email protected]')->name('login');
Route::group(['middleware' => ['acc']], function() {
Route::get('/', '[email protected]')->name('main');
});
Route::group(['middleware' => ['wm']], function() {
Route::get('wm', '[email protected]')->name('main');
});
Answer the question
In order to leave comments, you need to log in
Give them different names: main.acc/main.wm for example. The framework, on the other hand, cannot guess which address you want to receive if your routes have the same name - so it takes the last declared one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question