FEATURE: use more route model binding

This commit is contained in:
Michal Kváček
2017-08-01 19:10:55 +02:00
parent a7e91ef499
commit 3275e5aeed
22 changed files with 163 additions and 159 deletions
+8 -8
View File
@@ -9,34 +9,34 @@ Route::group(['namespace' => 'Contents'], function () {
->name('content.new');
// form for editing existing static page
Route::get('content/edit/{id}', 'EditContent@edit')
Route::get('content/edit/{page}', 'EditContent@edit')
->name('content.edit');
// post method for creating new static page
Route::post('content/new/{moduleId}', 'CreateNewContent@store')
Route::post('content/new/{module}', 'CreateNewContent@store')
->name('content.newPost');
// post method for creating new static page
Route::post('content/edit/{id}', 'EditContent@update')
Route::post('content/edit/{page}', 'EditContent@update')
->name('content.editPost');
// change status of page (protected, public or draft)
Route::get('content/status/{id}/{status}', 'ContentActions@changeStatus')
Route::get('content/status/{page}/{status}', 'ContentActions@changeStatus')
->name('content.changeStatus');
// set homepage
Route::get('content/homepage/{id}', 'ContentActions@setHomepage')
Route::get('content/homepage/{page}', 'ContentActions@setHomepage')
->name('content.setHomepage');
// delete page
Route::get('content/delete/{id}', 'ContentActions@delete')
Route::get('content/delete/{page}', 'ContentActions@delete')
->name('content.delete');
// history of changes for specified page
Route::get('history/{id}', 'History@getOverview')
Route::get('history/{page}', 'History@getOverview')
->name('content.history');
// history of changes for specified page
Route::get('history/{revision}/{id}', 'History@getDiff')
Route::get('history/{revision}', 'History@getDiff')
->name('history.diff');
});