|
楼主 |
发表于 2020-5-20 10:37:43
|
显示全部楼层
$routes->get('/', 'Home::index');
$routes->add('admin/home', 'Home::index', ['namespace' => 'App\Controllers\admin']);
$routes->add('admin/home/indexv1', 'Home::indexv1', ['namespace' => 'App\Controllers\admin']);
$routes->add('admin/home/index', 'Home::index', ['namespace' => 'App\Controllers\admin']);
//Login
$routes->add('admin/login', 'Login::index', ['namespace' => 'App\Controllers\admin']);
$routes->add('admin/login/index', 'Login::index', ['namespace' => 'App\Controllers\admin']);
$routes->add('admin/login/dologin', 'Login::dologin', ['namespace' => 'App\Controllers\admin']);
//News
$routes->add('admin/news', 'News::index', ['namespace' => 'App\Controllers\admin']);
$routes->add('admin/news/index', 'News::index', ['namespace' => 'App\Controllers\admin']);
$routes->add('admin/news/add', 'News::add', ['namespace' => 'App\Controllers\admin']);
$routes->add('admin/news/add', 'News::doadd', ['namespace' => 'App\Controllers\admin']);
$routes->add('admin/news/edit', 'News::edit', ['namespace' => 'App\Controllers\admin']);
$routes->add('admin/news/edit/(:num)', 'News::edit/$1', ['namespace' => 'App\Controllers\admin']);
$routes->add('admin/news/doedit', 'News::doedit', ['namespace' => 'App\Controllers\admin']);
$routes->add('admin/news/delnews', 'News::delnews', ['namespace' => 'App\Controllers\admin']);
$routes->add('admin/news/delnews/(:num)', 'News::delnews/$1', ['namespace' => 'App\Controllers\admin']);
以上的这一段能不能节省掉呢? |
|