<?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 WLW1p; P2SFp: foreach ($lzXUC as $l2LYK => $wsDBG) { if (file_exists($oU8qf = ModuleManager::path($l2LYK, 'OpenApi/routes.php'))) { $nmKJs[$l2LYK] = $oU8qf; } } goto gS9TG; rz8bt: $nmKJs = array(); goto P2SFp; WLW1p: $lzXUC = ModuleManager::listAllInstalledModules(); goto rz8bt; gS9TG: return $nmKJs; goto nbFqF; nbFqF: } public static function registerModuleRoutes() { goto vhoBL; i2cjH: foreach ($uEfXk as $l2LYK => $oU8qf) { Route::group(array('prefix' => config('modstart.openApi.prefix'), 'middleware' => array('openApi.bootstrap'), 'namespace' => "\\Module\\{$l2LYK}\\OpenApi\\Controller"), function ($router) use($oU8qf) { require $oU8qf; }); } goto z0pjn; z0pjn: if (file_exists($LL2ZC = modstart_open_api_path('routes.php'))) { require $LL2ZC; } goto EP3Vl; vhoBL: if (config('env.APP_DEBUG')) { $uEfXk = self::listModuleRoutes(); } else { $uEfXk = Cache::rememberForever('ModStartOpenApiRoutes', function () { return self::listModuleRoutes(); }); } goto i2cjH; EP3Vl: } }