Im trying to add more that one role in the Route::group.
Route::group(['middleware' => ['role:[admin,editor]']], function () {
Route::get('admin/general', 'AdminController@general');
});
Is this possible ?
There's an example on how to do this in the readme.
In the readme file example, you are setting ['middleware' => ['role:admin,access_backend']], but access_backend is a passed as a permission when it comes to the middleware, not as a role param. So is that possible add more than one role ?
Try Route::group(['middleware' => ['role:admin|editor']]
Most helpful comment
In the readme file example, you are setting ['middleware' => ['role:admin,access_backend']], but access_backend is a passed as a permission when it comes to the middleware, not as a role param. So is that possible add more than one role ?