fix: AppServiceProvider CLI 컨텍스트에서 request() 호출 에러 수정
- runningInConsole() 체크 추가로 artisan 명령어 실행 시 request 바인딩 에러 방지 - composer install 후 package:discover 실패 해결 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -46,9 +46,8 @@ class AppServiceProvider extends ServiceProvider
|
||||
public function register(): void
|
||||
{
|
||||
// 개발환경 + API 라우트에서만 쿼리 로그 수집
|
||||
if (app()->environment('local')) {
|
||||
// 콘솔/큐 등 non-HTTP 컨텍스트 보호
|
||||
if (function_exists('request') && request() && request()->is('api/*')) {
|
||||
if (app()->environment('local') && !app()->runningInConsole()) {
|
||||
if (request()->is('api/*')) {
|
||||
DB::enableQueryLog();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user