Skip to content

Commit 693afe8

Browse files
committed
Laravel8+ routes fix for delete function
1 parent ce1472a commit 693afe8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

templates/default-collective/routes-8.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
->name('[% store_route_name %]');
1111
Route::put('[% model_name_snake %]/{[% model_name_singular_variable %]}', [[% controller_name %]::class, 'update'])
1212
->name('[% update_route_name %]')[% route_id_clause %];
13-
Route::delete('/[% model_name_snake %]/{[% model_name_singular_variable %]}',[[% controller_name %]::class, 'index'])
13+
Route::delete('/[% model_name_snake %]/{[% model_name_singular_variable %]}',[[% controller_name %]::class, 'destroy'])
1414
->name('[% destroy_route_name %]')[% route_id_clause %];

templates/default/routes-8.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010
->name('[% store_route_name %]');
1111
Route::put('[% model_name_snake %]/{[% model_name_singular_variable %]}', [[% controller_name %]::class, 'update'])
1212
->name('[% update_route_name %]')[% route_id_clause %];
13-
Route::delete('/[% model_name_snake %]/{[% model_name_singular_variable %]}',[[% controller_name %]::class, 'index'])
13+
Route::delete('/[% model_name_snake %]/{[% model_name_singular_variable %]}',[[% controller_name %]::class, 'destroy'])
1414
->name('[% destroy_route_name %]')[% route_id_clause %];

0 commit comments

Comments
 (0)