Подскажите как я могу использовать 2 роли на 1 путь. Использую библиотеку Laravel Permission. При установке мдлвара 1 на роуты при повторной попытке вызвать выдает что роль не подходит.
Вот пример роут-листа.
Route::group(['middleware'=>['role:user_сitisen']],function(){
Route::get('/addcitisens', [App\Http\Controllers\CitisenControl::class, 'index']);
Route::get('/citisen/{id}', [App\Http\Controllers\CitisenControl::class, 'show']);
Route::post('/citisen/{id}', [App\Http\Controllers\CitisenControl::class, 'update'])->name('citisen');
Route::get('/destroy/{id}', [App\Http\Controllers\CitisenControl::class, 'destroy']);
Route::post('/citisens', [App\Http\Controllers\CitisenControl::class, 'store']);
Route::get('/citisens/export', [App\Http\Controllers\CitisenControl::class, 'CitisenExport']);
});
Route::group(['middleware'=>['role:user_avto']],function(){
Route::get('/avtoslist', [App\Http\Controllers\AvtosController::class, 'index']);
Route::get('/addavtos', [App\Http\Controllers\AvtosController::class, 'indexAdd']);
Route::post('/avtos', [App\Http\Controllers\AvtosController::class, 'store']);
});
Route::group(['middleware'=>['role:admin']],function(){
Route::get('/addcitisens', [App\Http\Controllers\CitisenControl::class, 'index']);
Route::get('/citisen/{id}', [App\Http\Controllers\CitisenControl::class, 'show']);
Route::post('/citisen/{id}', [App\Http\Controllers\CitisenControl::class, 'update'])->name('citisen');
Route::get('/destroy/{id}', [App\Http\Controllers\CitisenControl::class, 'destroy']);
Route::post('/citisens', [App\Http\Controllers\CitisenControl::class, 'store']);
Route::get('/citisens/export', [App\Http\Controllers\CitisenControl::class, 'CitisenExport']);
Route::get('/avtoslist', [App\Http\Controllers\AvtosController::class, 'index']);
Route::get('/addavtos', [App\Http\Controllers\AvtosController::class, 'indexAdd']);
Route::post('/avtos', [App\Http\Controllers\AvtosController::class, 'store']);
Route::get('/usersList', [App\Http\Controllers\UsersController::class, 'index'])->name('usersList');
Route::get('/addusers', [App\Http\Controllers\UsersController::class, 'indexUser']);
Route::post('/users', [App\Http\Controllers\UsersController::class, 'store']);
Route::get('/users/{id}', [App\Http\Controllers\UsersController::class, 'show']);
Route::post('/users/{id}', [App\Http\Controllers\UsersController::class, 'update']);
Route::get('/destroyuser/{id}', [App\Http\Controllers\UsersController::class, 'destroy']);
});