diff --git a/app/Services/EventCalendarService.php b/app/Services/EventCalendarService.php index c99839c..bfa5018 100644 --- a/app/Services/EventCalendarService.php +++ b/app/Services/EventCalendarService.php @@ -283,7 +283,7 @@ class EventCalendarService extends BaseService public static function targetModel() { - $pattern_id = EventCalendar::query()->where('status', 1)->first(['pattern_id']); + $pattern_id = EventCalendar::query()->where('status', 1)->value('pattern_id'); $columns = ['id as pattern_id', 'name as model_name']; if ($pattern_id) { $data = ParkingPattern::query()->find($pattern_id, $columns)->toArray();