fix : Trait 추가 및 query 디버깅 소스 수정

This commit is contained in:
2025-07-26 14:25:45 +09:00
parent 8a4a7c9508
commit 214adc8de1
6 changed files with 51 additions and 7 deletions

View File

@@ -77,9 +77,10 @@ public static function validate(
return $condition ? null : self::error($message, $code, $extra);
}
public static function response($type = '', $query = '', $debug = false, $key = ''): array
public static function response($type = '', $query = '', $key = ''): array
{
if ($debug && $type != 'success') DB::enableQueryLog(); // 쿼리 추적
if (app()->environment('local')) $debug = true;
if ($debug) DB::enableQueryLog(); // 쿼리 추적
$result = match ($type) {
'get' => $key ? $query->get()->keyBy($key) : $query->get(),