Ken 3 tháng trước cách đây
mục cha
commit
818823085b
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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) {