forked from CrestApps/laravel-code-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.stub
14 lines (14 loc) · 970 Bytes
/
routes.stub
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Route::get('/', '[% controller_name %]@index')
->name('[% index_route_name %]');
Route::get('/create','[% controller_name %]@create')
->name('[% create_route_name %]');
Route::get('/{[% model_name_singular_variable %]}/show','[% controller_name %]@show')
->name('[% show_route_name %]')[% route_id_clause %];
Route::get('/{[% model_name_singular_variable %]}/edit','[% controller_name %]@edit')
->name('[% edit_route_name %]')[% route_id_clause %];
Route::post('/store', '[% controller_name %]@store')
->name('[% store_route_name %]');
Route::put('/{[% model_name_singular_variable %]}/[% model_name_snake %]/update', '[% controller_name %]@update')
->name('[% update_route_name %]')[% route_id_clause %];
Route::delete('/{[% model_name_singular_variable %]}/[% model_name_snake %]/delete','[% controller_name %]@destroy')
->name('[% destroy_route_name %]')[% route_id_clause %];