|
|
@@ -15,13 +15,11 @@ static function odds($id)
|
|
|
$key = "odds_{$id}";
|
|
|
$odds = Cache::get($key, null);
|
|
|
if ($odds) return json_decode($odds, true);
|
|
|
- $res = Client::odds(['fixture'=>$id]);
|
|
|
+ $res = Client::odds(['fixture' => $id]);
|
|
|
+ if (count($res['response']) <= 0) return [];
|
|
|
+ $res = $res['response'][0];
|
|
|
+ Cache::put($key, $res, now()->addHours(3));
|
|
|
return $res;
|
|
|
-// $res['']
|
|
|
-// $sport = Sport::where('data_id', $id)->first();
|
|
|
-// return $sport->odds;
|
|
|
-
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/**
|