Beispiel #1
0
    $System->del_link($slug);
});
//分类链接
Macaw::get('/category/(:num).html', function ($slug) {
    $home = new HomeController();
    $home->category($slug);
});
//ajax刷新
Macaw::get('/home/getdata/', function () {
    $home = new HomeController();
    $home->getAjaxData();
});
//文章链接
Macaw::get('/article/(:num).html', function ($slug) {
    $home = new HomeController();
    $home->artice($slug);
});
//登录
Macaw::get('/admin/login/', 'LoginController@login');
Macaw::post('/admin/login/', 'LoginController@login');
//验证码
Macaw::get('/admin/code', 'LoginController@code');
//退出登录
Macaw::get('/admin/logout/', 'LoginController@logout');
Macaw::$error_callback = function () {
    throw new Exception("路由无匹配项 404 Not Found");
};
Macaw::get('/admin/test/page/(:num)/key/(:any)', function ($num, $param) {
    $mytestController = new MytestController();
    $mytestController->home($num, $param);
});