fix select country
This commit is contained in:
1 parent
cda3acc1a5
commit
cbc66d7e27
3 files changed
+68
-73
No files matched your search
@@ -14,22 +14,12 @@ class LoadSofaScoreCategory
|
||||
->groupBy('league_id')
|
||||
->pluck('league_id')->toArray();
|
||||
|
||||
/*
|
||||
0 => 24
|
||||
1 => 25
|
||||
2 => 54
|
||||
3 => 131
|
||||
4 => 192
|
||||
5 => 242
|
||||
6 => 406
|
||||
7 => 11539
|
||||
8 => 11621
|
||||
*/
|
||||
$res = SofaScoreTournament::with('sofascore_category')->whereIn('tournament_id', $league_ids)->get();
|
||||
|
||||
$sofa_score_category_id = SofaScoreTournament::whereIn('tournament_id', $league_ids)->pluck('sofa_score_category_id')->toArray();
|
||||
|
||||
$sofa_score_category_id = array_unique($sofa_score_category_id);
|
||||
|
||||
return SofaScoreCategory::where('in_soccer', 1)->whereIn('id', $sofa_score_category_id)->orderBy('name')->pluck('name', 'id');
|
||||
$arr = [];
|
||||
foreach ($res as $value) {
|
||||
$arr[$value->sofa_score_category_id] = $value->sofascore_category->name;
|
||||
}
|
||||
return $arr;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user