Ken 1 周之前
父節點
當前提交
2ef52f4757
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      app/Models/Prediction.php

+ 3 - 3
app/Models/Prediction.php

@@ -49,10 +49,10 @@ class Prediction extends Authenticatable
 
     function getWinningNumbersAttribute($value)
     {
-        if (!empty($this->winning_numbers)) {
+        if (!empty($value)) {
             $value = explode(',', $value);
-//            $value = array_map('intval', $value);
-//            $value[] = array_sum($value);
+            $value = array_map('intval', $value);
+            $value[] = array_sum($value);
             return $value;
         }
         return [];