FEATURE: use more route model binding
This commit is contained in:
@@ -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');
|
||||
});
|
||||
Reference in New Issue
Block a user