How to use the resource for different user roles?

A resource inside a middleware (check roles):
Route::group(['middleware' => ['role:creator,viewer']], function() { 
 Route::resource('passports', 'PassportsController');

How to make creator had all the methods of online, and the viewer only the 'index' and 'show' ?

Tried 2 times to determine the resource:
Route::resource('passports', 'PassportsController', [
 'middleware' => 'role:creator'
Route::resource('passports', 'PassportsController', [
 'middleware' => 'role:viewer'
])->only(['index', 'show']);

But it does not work, especially to identify the resource 2 times not the best solution.
April 3rd 20 at 17:17
1 answer
April 3rd 20 at 17:19
With the help of a politician

Find more questions by tags Laravel