Ken há 1 mês atrás
pai
commit
c8bca638bb
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      app/Services/FixtureService.php

+ 2 - 2
app/Services/FixtureService.php

@@ -25,7 +25,7 @@ static function odds(int|string $id)
         $res = Client::odds(['fixture' => $id]);
         if (count($res['response']) <= 0) return [];
         $res = $res['response'][0];
-        Cache::put($key, $res, now()->addHours(3));
+        Cache::put($key, json_encode($res), now()->addHours(3));
         return $res;
     }
 
@@ -43,7 +43,7 @@ static function oddsLive($id)
         $res = Client::oddsLive(['fixture' => $id]);
         if (count($res['response']) <= 0) return [];
         $res = $res['response'][0];
-        Cache::put($key, $res, 5);
+        Cache::put($key, json_encode($res), 5);
         return $res;
     }