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 [];