|
@@ -24,8 +24,16 @@ public function index()
|
|
|
// $data = FixtureService::index();
|
|
// $data = FixtureService::index();
|
|
|
$id = request()->input('id','1492541');
|
|
$id = request()->input('id','1492541');
|
|
|
|
|
|
|
|
- $data[] = DB::select("SELECT * FROM sports WHERE data_id = {$id}");
|
|
|
|
|
- $data[] = $this->football('/odds/live');
|
|
|
|
|
|
|
+ $sport = DB::select("SELECT * FROM sports WHERE data_id = {$id}");
|
|
|
|
|
+ $sport=$sport[0];
|
|
|
|
|
+ $list = $this->football('/odds/live');
|
|
|
|
|
+ $data[] = $sport;
|
|
|
|
|
+ foreach ($list['response'] as $item) {
|
|
|
|
|
+ if($item['fixture']['id'] == $sport['data_id']){
|
|
|
|
|
+ $data[] = $item;
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
return $this->success($data);
|
|
return $this->success($data);
|
|
|
}
|
|
}
|
|
|
|
|
|