34 lines
1.0 KiB
PHP
34 lines
1.0 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');
|
|
}); |