By default Resource controller gives you those Actions and Route names:
ACTION ROUTE NAME
index resource.index
create resource.create
store resource.store
show resource.show
edit resource.edit
update resource.update
destroy resource.destroy
and want to rename both of them (Actions and Routes names) to:
ACTION ROUTE NAME
**browse resource.browse**
create resource.create
store resource.store
show resource.show
edit resource.edit
update resource.update
**delete resource.delete**
And still use a Resource Controllers, like this:
Route::resource('resource', 'ResourceController');
and not a list of GET routes like this:
Route::get('resource', 'ResourceController@index');
Route::get('resource/create', 'ResourceController@index');
...
question from:
https://stackoverflow.com/questions/65642130/laravel-custom-action-names-and-route-names-using-a-resource-controller 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…