environment('testing') || ! self::isInstalled()) { return; } try { Artisan::call('route:cache'); } catch (\Throwable $e) { Log::warning('라우트 캐시 재생성 실패 (route:clear 로 stale 은 제거됨 — 다음 요청은 비캐시 부팅)', [ 'error' => $e->getMessage(), ]); } } /** * 라우트 캐시만 제거합니다 (재생성 없음). * * 재생성이 부적절한 특수 경로(예: 코어 업데이트 흐름 중간 — vendor 교체 중 상태를 * 캐시에 구울 수 없다)를 위한 보조 진입점. * * @return void */ public static function clear(): void { Artisan::call('route:clear'); } /** * G7 설치 완료 여부를 확인합니다. * * @return bool 설치 완료 시 true */ private static function isInstalled(): bool { if (config('app.installer_completed')) { return true; } return file_exists(storage_path('app/g7_installed')); } }