Browse Source

模式管理接口优化3

master
wanghongjun 4 weeks ago
parent
commit
c57c079041
  1. 2
      app/Services/EventCalendarService.php

2
app/Services/EventCalendarService.php

@ -283,7 +283,7 @@ class EventCalendarService extends BaseService
public static function targetModel() 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']; $columns = ['id as pattern_id', 'name as model_name'];
if ($pattern_id) { if ($pattern_id) {
$data = ParkingPattern::query()->find($pattern_id, $columns)->toArray(); $data = ParkingPattern::query()->find($pattern_id, $columns)->toArray();

Loading…
Cancel
Save