Ken il y a 1 semaine
Parent
commit
2ef52f4757
1 fichiers modifiés avec 3 ajouts et 3 suppressions
  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 [];