<?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 CdpAl; MqhC6: foreach ($lzXUC as $l2LYK => $wsDBG) { if (file_exists($oU8qf = ModuleManager::path($l2LYK, 'Web/routes.php'))) { $nmKJs[$l2LYK] = $oU8qf; } } goto siPLp; siPLp: return $nmKJs; goto Fv1J2; zG6qb: $nmKJs = array(); goto MqhC6; CdpAl: $lzXUC = ModuleManager::listAllInstalledModules(); goto zG6qb; Fv1J2: } public static function registerModuleRoutes() { goto oMbP9; oMbP9: if (config('env.APP_DEBUG')) { $uEfXk = self::listModuleRoutes(); } else { $uEfXk = Cache::rememberForever('ModStartWebRoutes', function () { return self::listModuleRoutes(); }); } goto AIXPh; AIXPh: foreach ($uEfXk as $l2LYK => $oU8qf) { Route::group(array('prefix' => config('modstart.web.prefix'), 'middleware' => array('web.bootstrap'), 'namespace' => "\\Module\\{$l2LYK}\\Web\\Controller"), function ($router) use($oU8qf) { require $oU8qf; }); } goto DV3en; DV3en: if (file_exists($LL2ZC = modstart_web_path('routes.php'))) { require $LL2ZC; } goto NXMKv; NXMKv: } }