<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\App\OpenApi; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Route; use ModStart\Module\ModuleManager; class ModStartOpenApi { private static function listModuleRoutes() { goto fSLc3; fSLc3: $YdlEo = ModuleManager::listAllInstalledModulesInRequiredOrder(true); goto nuN8q; nuN8q: $moNxb = array(); goto QUsna; INmp7: return $moNxb; goto fi74q; QUsna: foreach ($YdlEo as $satFX) { if (file_exists($sCmIC = ModuleManager::path($satFX, 'OpenApi/routes.php'))) { $moNxb[$satFX] = $sCmIC; } } goto INmp7; fi74q: } public static function registerModuleRoutes() { goto fhxa6; fhxa6: if (config('env.APP_DEBUG')) { $z7thA = self::listModuleRoutes(); } else { $z7thA = Cache::rememberForever('ModStartOpenApiRoutes', function () { return self::listModuleRoutes(); }); } goto XI90Q; g_fM2: if (file_exists($hHJCV = modstart_open_api_path('routes.php'))) { require $hHJCV; } goto BlznM; XI90Q: foreach ($z7thA as $satFX => $sCmIC) { Route::group(array('prefix' => config('modstart.openApi.prefix'), 'middleware' => array('openApi.bootstrap'), 'namespace' => "\\Module\\{$satFX}\\OpenApi\\Controller"), function ($router) use($sCmIC) { if (file_exists($sCmIC)) { require $sCmIC; } }); } goto g_fM2; BlznM: } }