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