Files
sentcms/route/app.php
tensent 5c320206fb auth
2020-02-16 10:49:43 +08:00

42 lines
1.6 KiB
PHP
Executable File

<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\facade\Route;
Route::rule('/', 'Index/index');
Route::rule('search', 'Index/search');
Route::rule('lists', 'Index/lists');
Route::rule('detail', 'Index/detail');
Route::rule('category', 'Index/category');
Route::rule('topic-:id', 'Index/topic');
Route::group('admin', function () {
Route::rule('/', 'admin.Index/index');
Route::rule('login', 'admin.Index/login');
Route::rule('logout', 'admin.Index/logout');
Route::rule(':controller/:function', 'admin.:controller/:function');
});
Route::group('user', function () {
Route::rule('/', 'admin.Index/index');
Route::rule('login', 'user.Index/login');
Route::rule('logout', 'user.Index/logout');
Route::rule('register', 'user.Index/register');
Route::rule(':controller/:function', 'user.:controller/:function');
});
Route::group('api', function () {
Route::rule('/', 'admin.Index/index');
Route::rule('login', 'api.Index/login');
Route::rule('register', 'api.Index/register');
Route::rule(':controller/:function', 'api.:controller/:function');
});
Route::miss('Index/miss');