<?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 c1Gir; uTXca: $qwIog = array(); goto pa3Js; uwqwB: return $qwIog; goto eZWbL; c1Gir: $sywti = ModuleManager::listAllInstalledModulesInRequiredOrder(true); goto uTXca; pa3Js: foreach ($sywti as $CiBrR) { if (file_exists($yHf3t = ModuleManager::path($CiBrR, 'Web/routes.php'))) { $qwIog[$CiBrR] = $yHf3t; } } goto uwqwB; eZWbL: } public static function registerModuleRoutes() { goto VLUDV; grrdg: foreach ($a8f31 as $CiBrR => $yHf3t) { Route::group(array('prefix' => config('modstart.web.prefix'), 'middleware' => array('web.bootstrap'), 'namespace' => "\\Module\\{$CiBrR}\\Web\\Controller"), function ($router) use($yHf3t) { if (file_exists($yHf3t)) { require $yHf3t; } }); } goto onlDr; VLUDV: if (config('env.APP_DEBUG')) { $a8f31 = self::listModuleRoutes(); } else { $a8f31 = Cache::rememberForever('ModStartWebRoutes', function () { return self::listModuleRoutes(); }); } goto grrdg; onlDr: if (file_exists($Qkds9 = modstart_web_path('routes.php'))) { require $Qkds9; } goto jlvu0; jlvu0: } }