|
|
@@ -21,6 +21,14 @@ static function updateOdds()
|
|
|
foreach ($list['response'] as $item) {
|
|
|
$sport = Sport::where('data_id', $item['fixture']['id'])->first();
|
|
|
$sport->odds = json_encode($item['odds']);
|
|
|
+ $sport->state = 1;
|
|
|
+ $score = $item['teams']['home']['goals'];
|
|
|
+ $score .= "-";
|
|
|
+ $score .= $item['teams']['away']['goals'];
|
|
|
+ if ($item['fixture']['status']['long'] == 'First Half') {
|
|
|
+ $sport->half_score = $score;
|
|
|
+ }
|
|
|
+ $sport->score = $score;
|
|
|
$sport->save();
|
|
|
}
|
|
|
}
|