<?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 nMBdI; n8sX6: $vQMyn = array(); goto tmKTj; P74ip: return $vQMyn; goto Kzqbl; tmKTj: foreach ($o6GFl as $h8H9D) { if (file_exists($aYJAK = ModuleManager::path($h8H9D, 'Web/routes.php'))) { $vQMyn[$h8H9D] = $aYJAK; } } goto P74ip; nMBdI: $o6GFl = ModuleManager::listAllInstalledModulesInRequiredOrder(true); goto n8sX6; Kzqbl: } public static function registerModuleRoutes() { goto hkav1; hkav1: if (config('env.APP_DEBUG')) { $YGKPa = self::listModuleRoutes(); } else { $YGKPa = Cache::rememberForever('ModStartWebRoutes', function () { return self::listModuleRoutes(); }); } goto ecXnG; bLK3x: if (file_exists($urkV4 = modstart_web_path('routes.php'))) { require $urkV4; } goto KlX5i; ecXnG: foreach ($YGKPa as $h8H9D => $aYJAK) { Route::group(array('prefix' => config('modstart.web.prefix'), 'middleware' => array('web.bootstrap'), 'namespace' => "\\Module\\{$h8H9D}\\Web\\Controller"), function ($router) use($aYJAK) { if (file_exists($aYJAK)) { require $aYJAK; } }); } goto bLK3x; KlX5i: } }