<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\App\Web; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Route; use ModStart\Module\ModuleManager; class ModStartWeb { private static function listModuleRoutes() { goto oxQ06; hibKy: foreach ($CveEo as $vbusR) { if (file_exists($RLMU5 = ModuleManager::path($vbusR, 'Web/routes.php'))) { $GsFul[$vbusR] = $RLMU5; } } goto O3zqN; pU2Qc: $GsFul = array(); goto hibKy; O3zqN: return $GsFul; goto jxlkd; oxQ06: $CveEo = ModuleManager::listAllInstalledModulesInRequiredOrder(true); goto pU2Qc; jxlkd: } public static function registerModuleRoutes() { goto kdtuV; kdtuV: if (config('env.APP_DEBUG')) { $oVpdn = self::listModuleRoutes(); } else { $oVpdn = Cache::rememberForever('ModStartWebRoutes', function () { return self::listModuleRoutes(); }); } goto sIIz2; LAgWL: if (file_exists($Yf5XN = modstart_web_path('routes.php'))) { require $Yf5XN; } goto mxEps; sIIz2: foreach ($oVpdn as $vbusR => $RLMU5) { Route::group(array('prefix' => config('modstart.web.prefix'), 'middleware' => array('web.bootstrap'), 'namespace' => "\\Module\\{$vbusR}\\Web\\Controller"), function ($router) use($RLMU5) { if (file_exists($RLMU5)) { require $RLMU5; } }); } goto LAgWL; mxEps: } }