1. Go to this page and download the library: Download yangsuda/slimcms 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/ */
yangsuda / slimcms example snippets
use SlimCMS\Core\RouteAction as Route;
Route::get('/path', 'Controller@method'); // GET
Route::post('/path', 'Controller@method'); // POST
Route::gp('/path', 'Controller@method'); // GET + POST
Route::any('/path', 'Controller@method'); // 所有方法
// 路由分组,支持链式挂载中间件
Route::group('/admin', function () {
Route::get('/index', 'admin\MainController@index');
Route::gp('/login', 'admin\LoginController@login');
Route::group('', function () {
Route::gp('/{path1}/{path2}'); // 动态路由参数
})->add(AdminAuthMiddleware::class);
})->add(SessionMiddleware::class);