Route::resource('roles', 'RolesController', ['except' => ['edit', 'create']]);So, just list the methods you won't use. Or, alternatively, list methods you only want to use:
Route::resource('roles', 'RolesController', [ 'only' => ['index', 'show', 'store', 'update', 'destroy'] ]);
Second: From Laravel 5.4.24 we have a new route function apiResource()
Route::apiResource('roles', 'RolesController');It will form and pass the same only parameter as in example above. Thanks Lasse Rafn for pointing it out on Twitter.
No comments or questions yet...