<?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 xnpIF; O2Lh9: return $zdxah; goto p0dfC; xnpIF: $Zf0sy = ModuleManager::listAllInstalledModulesInRequiredOrder(true); goto n7sh0; pdv8H: foreach ($Zf0sy as $tUxPr) { if (file_exists($ypGny = ModuleManager::path($tUxPr, 'Web/routes.php'))) { $zdxah[$tUxPr] = $ypGny; } } goto O2Lh9; n7sh0: $zdxah = array(); goto pdv8H; p0dfC: } public static function registerModuleRoutes() { goto E7KAT; gvF0_: foreach ($on4ze as $tUxPr => $ypGny) { Route::group(array('prefix' => config('modstart.web.prefix'), 'middleware' => array('web.bootstrap'), 'namespace' => "\\Module\\{$tUxPr}\\Web\\Controller"), function ($router) use($ypGny) { if (file_exists($ypGny)) { require $ypGny; } }); } goto PFFaW; PFFaW: if (file_exists($nbD48 = modstart_web_path('routes.php'))) { require $nbD48; } goto OecNa; E7KAT: if (config('env.APP_DEBUG')) { $on4ze = self::listModuleRoutes(); } else { $on4ze = Cache::rememberForever('ModStartWebRoutes', function () { return self::listModuleRoutes(); }); } goto gvF0_; OecNa: } }