<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\Admin; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Route; use ModStart\Module\ModuleManager; class ModStartAdmin { public static function registerAuthRoutes() { Route::group(array('prefix' => config('modstart.admin.prefix'), 'namespace' => '\\ModStart\\Admin\\Controller', 'middleware' => array('admin.bootstrap', 'admin.auth')), function ($router) { $router->match(array('get', 'post'), 'login', 'AuthController@login'); $router->match(array('get', 'post'), 'login_quick', 'AuthController@loginQuick'); $router->match(array('get'), 'logout', 'AuthController@logout'); $router->match(array('get'), 'login/captcha', 'AuthController@loginCaptcha'); $router->match(array('get'), 'sso/client', 'AuthController@ssoClient'); $router->match(array('get'), 'sso/server', 'AuthController@ssoServer'); $router->match(array('get'), 'sso/server_success', 'AuthController@ssoServerSuccess'); $router->match(array('get'), 'sso/server_logout', 'AuthController@ssoServerLogout'); $router->match(array('post'), 'util/frame', 'UtilController@frame'); $router->match(array('post'), 'system/clear_cache', 'SystemController@clearCache'); $router->match(array('get', 'post'), 'system/security_fix', 'SystemController@securityFix'); $router->match(array('get', 'post'), 'admin_role', 'AdminRoleController@index'); $router->match(array('get', 'post'), 'admin_role/add', 'AdminRoleController@add'); $router->match(array('get', 'post'), 'admin_role/edit', 'AdminRoleController@edit'); $router->match(array('post'), 'admin_role/delete', 'AdminRoleController@delete'); $router->match(array('get'), 'admin_role/show', 'AdminRoleController@show'); $router->match(array('get', 'post'), 'admin_user', 'AdminUserController@index'); $router->match(array('get', 'post'), 'admin_user/add', 'AdminUserController@add'); $router->match(array('get', 'post'), 'admin_user/edit', 'AdminUserController@edit'); $router->match(array('post'), 'admin_user/delete', 'AdminUserController@delete'); $router->match(array('get'), 'admin_user/show', 'AdminUserController@show'); $router->match(array('get', 'post'), 'profile/change_password', 'ProfileController@changePassword'); $router->match(array('get', 'post'), 'admin_log', 'AdminLogController@index'); $router->match(array('get'), 'admin_log/show', 'AdminLogController@show'); $router->match(array('post'), 'admin_log/delete', 'AdminLogController@delete'); $router->match(array('get', 'post'), 'data/file_manager/{category}', 'DataController@fileManager'); $router->match(array('get', 'post'), 'data/ueditor', 'DataController@ueditor'); }); } private static function listModuleRoutes() { goto XORXk; XORXk: $sywti = ModuleManager::listAllInstalledModulesInRequiredOrder(); goto TinWD; lYWHz: foreach ($sywti as $CiBrR) { if (file_exists($yHf3t = ModuleManager::path($CiBrR, 'Admin/routes.php'))) { $qwIog[$CiBrR] = $yHf3t; } } goto ZDyqP; TinWD: $qwIog = array(); goto lYWHz; ZDyqP: return $qwIog; goto lMx0U; lMx0U: } public static function registerModuleRoutes() { goto I9jDD; I9jDD: if (config('env.APP_DEBUG')) { $a8f31 = self::listModuleRoutes(); } else { $a8f31 = Cache::rememberForever('ModStartAdminRoutes', function () { return self::listModuleRoutes(); }); } goto a7cEW; H2Kav: if (file_exists($Qkds9 = modstart_admin_path('routes.php'))) { require $Qkds9; } goto YyY6M; a7cEW: foreach ($a8f31 as $CiBrR => $yHf3t) { Route::group(array('prefix' => config('modstart.admin.prefix'), 'middleware' => array('admin.bootstrap', 'admin.auth'), 'namespace' => "\\Module\\{$CiBrR}\\Admin\\Controller"), function ($router) use($yHf3t) { if (file_exists($yHf3t)) { require $yHf3t; } }); } goto H2Kav; YyY6M: } }