PHP code example of glebstar / laravel5-simple-cms
1. Go to this page and download the library: Download glebstar/laravel5-simple-cms library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
glebstar / laravel5-simple-cms example snippets
GlebStarSimpleCms\ServiceProvider::class,
Route::group(['prefix' => 'cms', 'middleware' => 'cms'], function(){
Route::get('/', ['as' => 'cms', 'uses' =>'\GlebStarSimpleCms\Controllers\AdminController@index']);
Route::match(['get', 'post'], '/add', '\GlebStarSimpleCms\Controllers\AdminController@add');
Route::match(['get', 'post'], '/edit/{id}', '\GlebStarSimpleCms\Controllers\AdminController@edit');
Route::delete('/delete/{id}', '\GlebStarSimpleCms\Controllers\AdminController@delete');
});
// this route should be the last.
Route::get('{path}', '\GlebStarSimpleCms\Controllers\CmsController@index')->where('path', '([A-z\d-\/_.]+)?');