<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\App\Web; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Route; use ModStart\ModStart; use ModStart\Module\ModuleManager; class ModStartWeb { private static function listModuleRoutes() { goto LuZIQ; sgjMF: $Kxp3W = array(); goto BcCW5; a9d0P: return $Kxp3W; goto wSPtW; LuZIQ: $XgbS2 = ModuleManager::listAllInstalledModulesInRequiredOrder(true); goto sgjMF; BcCW5: foreach ($XgbS2 as $JHuzz) { if (file_exists($WF06r = ModuleManager::path($JHuzz, 'Web/routes.php'))) { $Kxp3W[$JHuzz] = $WF06r; } } goto a9d0P; wSPtW: } public static function registerModuleRoutes() { goto D821g; D821g: if (config('env.APP_DEBUG')) { $VBeCb = self::listModuleRoutes(); } else { if (method_exists(ModStart::class, 'cacheKey')) { $VBeCb = Cache::rememberForever(ModStart::cacheKey('ModStartWebRoutes'), function () { return self::listModuleRoutes(); }); } else { $VBeCb = self::listModuleRoutes(); } } goto Xw339; Xw339: foreach ($VBeCb as $JHuzz => $WF06r) { Route::group(array('prefix' => config('modstart.web.prefix'), 'middleware' => array('web.bootstrap'), 'namespace' => "\\Module\\{$JHuzz}\\Web\\Controller"), function ($router) use($WF06r) { if (file_exists($WF06r)) { require $WF06r; } }); } goto E7g0g; E7g0g: if (file_exists($LxgGc = modstart_web_path('routes.php'))) { require $LxgGc; } goto KBvgh; KBvgh: } }