Ken hace 2 meses
padre
commit
818823085b
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  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) {