42 lines
1.5 KiB
PHP
42 lines
1.5 KiB
PHP
<?php
|
|
Route::group(['namespace' => 'Contents'], function () {
|
|
// list of all static pages
|
|
Route::get('content/overview/{moduleId?}/{status?}', 'ContentOverview@index')
|
|
->name('content.overview');
|
|
|
|
// form for creating new static page
|
|
Route::get('content/new/{moduleId}', 'CreateNewContent@create')
|
|
->name('content.new');
|
|
|
|
// form for editing existing static page
|
|
Route::get('content/edit/{id}', 'EditContent@edit')
|
|
->name('content.edit');
|
|
|
|
// post method for creating new static page
|
|
Route::post('content/new/{moduleId}', 'CreateNewContent@store')
|
|
->name('content.newPost');
|
|
|
|
// post method for creating new static page
|
|
Route::post('content/edit/{id}', 'EditContent@update')
|
|
->name('content.editPost');
|
|
|
|
// change status of page (protected, public or draft)
|
|
Route::get('content/status/{id}/{status}', 'ContentActions@changeStatus')
|
|
->name('content.changeStatus');
|
|
|
|
// set homepage
|
|
Route::get('content/homepage/{id}', 'ContentActions@setHomepage')
|
|
->name('content.setHomepage');
|
|
|
|
// delete page
|
|
Route::get('content/delete/{id}', 'ContentActions@delete')
|
|
->name('content.delete');
|
|
|
|
// history of changes for specified page
|
|
Route::get('history/{id}', 'History@getOverview')
|
|
->name('content.history');
|
|
|
|
// history of changes for specified page
|
|
Route::get('history/{revision}/{id}', 'History@getDiff')
|
|
->name('history.diff');
|
|
}); |