Files
core/modules/StaticPages/Http/routes.php
T

50 lines
1.5 KiB
PHP

<?php
Route::group([
'middleware' => 'web',
'prefix' => 'page',
'namespace' => 'Modules\StaticPages\Http\Controllers'
], function () {
Route::get('/{url}', 'StaticPagesController@index');
});
// routes group for admin area
Route::group([
'middleware' => ['web', 'auth'],
'prefix' => 'admin/pages',
'namespace' => 'Modules\StaticPages\Http\Controllers\Admin'
], function () {
// list of all static pages
Route::get('overview', 'StaticPageOverview@getOverview')
->name('staticpage.overview');
// form for creating new static page
Route::get('new', 'CreateNewStaticPage@getNew')
->name('staticpage.new');
// form for editing existing static page
Route::get('edit/{id}', 'EditStaticPage@getEdit')
->name('staticpage.edit');
// post method for creating new static page
Route::post('new', 'CreateNewStaticPage@postNew')
->name('staticpage.newPost');
// routes for quick actions
// change status of page (protected, public or draft)
Route::get('status/{id}/{status}', 'EditStaticPage@changeStatus')
->name('staticpage.changeStatus');
// delete page
Route::get('delete/{id}', 'EditStaticPage@deletePage')
->name('staticpage.delete');
// display change history of given page
// Route::get('history/{id}', 'StaticPageHistory@getHistory')->name('staticpage.history');
// Route::get('', '')->name('staticpage.');
});