diff --git a/app/Http/Controllers/Api/Admin/ItemFieldController.php b/app/Http/Controllers/Api/Admin/ItemFieldController.php index 4116b200..dda3a7f4 100644 --- a/app/Http/Controllers/Api/Admin/ItemFieldController.php +++ b/app/Http/Controllers/Api/Admin/ItemFieldController.php @@ -165,7 +165,7 @@ public function customFields(Request $request): View $fields = $this->service->getFields($tenantId, $filters); // per_page 값을 명시적으로 뷰에 전달 (셀렉트박스 selected 상태 유지용) - $perPage = !empty($filters['per_page']) ? (int) $filters['per_page'] : 20; + $perPage = ! empty($filters['per_page']) ? (int) $filters['per_page'] : 20; return view('item-fields.partials.custom-fields', [ 'fields' => $fields, @@ -628,12 +628,12 @@ public function storeSourceTable(Request $request): JsonResponse // MySQL INFORMATION_SCHEMA에서 컬럼 정보 조회 (COMMENT 포함) $dbName = config('database.connections.mysql.database'); - $columnInfos = DB::select(" + $columnInfos = DB::select(' SELECT COLUMN_NAME, COLUMN_TYPE, COLUMN_COMMENT, IS_NULLABLE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ? ORDER BY ORDINAL_POSITION - ", [$dbName, $tableName]); + ', [$dbName, $tableName]); $createdCount = 0; $orderNo = 1; @@ -726,11 +726,11 @@ public function syncSourceTableFieldNames(string $sourceTable): JsonResponse // MySQL INFORMATION_SCHEMA에서 컬럼 정보 조회 (COMMENT 포함) $dbName = config('database.connections.mysql.database'); - $columnInfos = DB::select(" + $columnInfos = DB::select(' SELECT COLUMN_NAME, COLUMN_COMMENT, IS_NULLABLE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ? - ", [$dbName, $sourceTable]); + ', [$dbName, $sourceTable]); // 컬럼명 => COMMENT 매핑 $columnComments = collect($columnInfos)->keyBy('COLUMN_NAME'); @@ -781,7 +781,7 @@ public function databaseTables(Request $request): JsonResponse // DB 테이블 목록 조회 $tables = collect(DB::select('SHOW TABLES')) ->map(fn ($table) => array_values((array) $table)[0]) - ->filter(function ($table) use ($excludedTables, $registeredTables) { + ->filter(function ($table) use ($excludedTables) { // 시스템 테이블 제외 if (in_array($table, $excludedTables)) { return false; @@ -850,12 +850,12 @@ public function tableColumns(string $table): JsonResponse // MySQL INFORMATION_SCHEMA에서 컬럼 정보 조회 (COMMENT 포함) $dbName = config('database.connections.mysql.database'); - $columnInfos = DB::select(" + $columnInfos = DB::select(' SELECT COLUMN_NAME, COLUMN_TYPE, DATA_TYPE, COLUMN_COMMENT, IS_NULLABLE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ? ORDER BY ORDINAL_POSITION - ", [$dbName, $table]); + ', [$dbName, $table]); $columnDetails = []; diff --git a/app/Http/Controllers/DailyLogController.php b/app/Http/Controllers/DailyLogController.php index df909ff0..c0c40d46 100644 --- a/app/Http/Controllers/DailyLogController.php +++ b/app/Http/Controllers/DailyLogController.php @@ -70,14 +70,14 @@ private function getAttentionIssues(): array ->where('due_date', '<', $today); }) // 이번 주 마감 예정 - ->orWhere(function ($q2) use ($today, $weekEnd) { - $q2->whereNotNull('due_date') - ->whereBetween('due_date', [$today, $weekEnd]); - }) + ->orWhere(function ($q2) use ($today, $weekEnd) { + $q2->whereNotNull('due_date') + ->whereBetween('due_date', [$today, $weekEnd]); + }) // 긴급 표시 - ->orWhere('is_urgent', true); + ->orWhere('is_urgent', true); }) - ->orderByRaw("CASE WHEN due_date < CURDATE() THEN 0 ELSE 1 END") // 마감초과 우선 + ->orderByRaw('CASE WHEN due_date < CURDATE() THEN 0 ELSE 1 END') // 마감초과 우선 ->orderBy('is_urgent', 'desc') ->orderBy('due_date') ->get(); @@ -110,14 +110,14 @@ private function getAttentionTasks(): array ->where('due_date', '<', $today); }) // 이번 주 마감 예정 - ->orWhere(function ($q2) use ($today, $weekEnd) { - $q2->whereNotNull('due_date') - ->whereBetween('due_date', [$today, $weekEnd]); - }) + ->orWhere(function ($q2) use ($today, $weekEnd) { + $q2->whereNotNull('due_date') + ->whereBetween('due_date', [$today, $weekEnd]); + }) // 긴급 표시 - ->orWhere('is_urgent', true); + ->orWhere('is_urgent', true); }) - ->orderByRaw("CASE WHEN due_date < CURDATE() THEN 0 ELSE 1 END") + ->orderByRaw('CASE WHEN due_date < CURDATE() THEN 0 ELSE 1 END') ->orderBy('is_urgent', 'desc') ->orderBy('due_date') ->get(); diff --git a/app/Http/Controllers/DevTools/ApiExplorerController.php b/app/Http/Controllers/DevTools/ApiExplorerController.php index 3cb65d61..50a2cf8f 100644 --- a/app/Http/Controllers/DevTools/ApiExplorerController.php +++ b/app/Http/Controllers/DevTools/ApiExplorerController.php @@ -151,7 +151,7 @@ public function execute(Request $request): JsonResponse // Authorization 헤더 추가 (사용자 입력 토큰이 우선) if ($token) { - $headers['Authorization'] = 'Bearer ' . $token; + $headers['Authorization'] = 'Bearer '.$token; } // API 실행 diff --git a/app/Http/Controllers/Lab/StrategyController.php b/app/Http/Controllers/Lab/StrategyController.php index 83643eef..1bb9ac5f 100644 --- a/app/Http/Controllers/Lab/StrategyController.php +++ b/app/Http/Controllers/Lab/StrategyController.php @@ -129,4 +129,4 @@ public function salesStrategy() { return view('lab.strategy.sales-strategy'); } -} \ No newline at end of file +} diff --git a/app/Models/ApiRequestLog.php b/app/Models/ApiRequestLog.php index 245d9252..2e83924c 100644 --- a/app/Models/ApiRequestLog.php +++ b/app/Models/ApiRequestLog.php @@ -130,7 +130,7 @@ public function getAiAnalysisSummaryAttribute(): string $summary .= "### 요청 정보\n"; $summary .= "- **메서드**: {$this->method}\n"; $summary .= "- **URL**: {$this->url}\n"; - $summary .= "- **라우트**: " . ($this->route_name ?? 'N/A') . "\n"; + $summary .= '- **라우트**: '.($this->route_name ?? 'N/A')."\n"; $summary .= "- **상태 코드**: {$this->response_status}\n"; $summary .= "- **응답 시간**: {$this->duration_ms}ms\n"; $summary .= "- **요청 시간**: {$this->created_at->format('Y-m-d H:i:s')}\n\n"; @@ -154,4 +154,4 @@ public function getAiAnalysisSummaryAttribute(): string return $summary; } -} \ No newline at end of file +} diff --git a/app/Services/ItemFieldSeedingService.php b/app/Services/ItemFieldSeedingService.php index e2997dbb..ad12c808 100644 --- a/app/Services/ItemFieldSeedingService.php +++ b/app/Services/ItemFieldSeedingService.php @@ -368,7 +368,7 @@ public function getFields(int $tenantId, array $filters = []): \Illuminate\Contr } // 페이지당 항목 수 (기본 20개) - $perPage = !empty($filters['per_page']) ? (int) $filters['per_page'] : 20; + $perPage = ! empty($filters['per_page']) ? (int) $filters['per_page'] : 20; // 시스템 필드 우선 정렬 (is_common DESC), 그 다음 source_table, order_no return $query->orderByDesc('is_common')