Ken преди 2 месеца
родител
ревизия
818823085b
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      app/Http/Controllers/api/Issue.php

+ 2 - 2
app/Http/Controllers/api/Issue.php

@@ -27,8 +27,8 @@ class Issue extends BaseController
             ]);
             $date = request()->input('date', null);
             if (!$date) $date = date("Y-m-d");
-            $list = CaoHistory::where('date', $date)->get();
-            if(count($list)>0)$list = $list[0];
+            $list = CaoHistory::where('date', $date)->get()->toArray();
+            if (count($list) > 0) $list = $list[0];
 
 
         } catch (ValidationException $e) {