<?php
/**
 * ------------------------ 
 *  版权所有  www.tecmz.com
 *  商业版本请购买正版授权使用
 * ------------------------
*/ namespace ModStart\App\Api; use Illuminate\Support\Facades\Cache; use Illuminate\Support\Facades\Route; use ModStart\Module\ModuleManager; class ModStartApi { private static function listModuleRoutes() { goto xKUfJ; GAT87: foreach ($o6GFl as $h8H9D) { if (file_exists($aYJAK = ModuleManager::path($h8H9D, 'Api/routes.php'))) { $vQMyn[$h8H9D] = $aYJAK; } } goto aDDKc; aDDKc: return $vQMyn; goto u6LHf; nHo_6: $vQMyn = array(); goto GAT87; xKUfJ: $o6GFl = ModuleManager::listAllInstalledModulesInRequiredOrder(true); goto nHo_6; u6LHf: } public static function registerModuleRoutes() { goto vxUvz; mIqNj: foreach ($YGKPa as $h8H9D => $aYJAK) { Route::group(array('prefix' => config('modstart.api.prefix'), 'middleware' => array('api.bootstrap', 'api.session'), 'namespace' => "\\Module\\{$h8H9D}\\Api\\Controller"), function ($router) use($aYJAK) { if (file_exists($aYJAK)) { require $aYJAK; } }); } goto ut0Uj; vxUvz: if (config('env.APP_DEBUG')) { $YGKPa = self::listModuleRoutes(); } else { $YGKPa = Cache::rememberForever('ModStartApiRoutes', function () { return self::listModuleRoutes(); }); } goto mIqNj; ut0Uj: if (file_exists($urkV4 = modstart_api_path('routes.php'))) { require $urkV4; } goto QC41n; QC41n: } }