<?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 NXzUi; lmltI: return $moNxb; goto BwsMu; I5hja: foreach ($YdlEo as $satFX) { if (file_exists($sCmIC = ModuleManager::path($satFX, 'Web/routes.php'))) { $moNxb[$satFX] = $sCmIC; } } goto lmltI; s80hg: $moNxb = array(); goto I5hja; NXzUi: $YdlEo = ModuleManager::listAllInstalledModulesInRequiredOrder(true); goto s80hg; BwsMu: } public static function registerModuleRoutes() { goto CGwxf; CGwxf: if (config('env.APP_DEBUG')) { $z7thA = self::listModuleRoutes(); } else { $z7thA = Cache::rememberForever('ModStartWebRoutes', function () { return self::listModuleRoutes(); }); } goto POYyN; POYyN: foreach ($z7thA as $satFX => $sCmIC) { Route::group(array('prefix' => config('modstart.web.prefix'), 'middleware' => array('web.bootstrap'), 'namespace' => "\\Module\\{$satFX}\\Web\\Controller"), function ($router) use($sCmIC) { if (file_exists($sCmIC)) { require $sCmIC; } }); } goto VVzIg; VVzIg: if (file_exists($hHJCV = modstart_web_path('routes.php'))) { require $hHJCV; } goto i3fim; i3fim: } }