logifuture

This commit is contained in:
salam committed 2026-01-07 19:45:33 +01:00
1 parent 91ec9d11cc
commit 0e34020a01
22 files changed
+546 -442

No files matched your search

+6 -2
View File
@@ -6,13 +6,17 @@ use App\Models\CompetitionGroupProvider;
class LoadGroups
{
public static function load($provider_id)
public static function load($provider_id, $load_by_name = false)
{
$res = CompetitionGroupProvider::where('provider_id', $provider_id)->get();
$r = [];
foreach ($res as $val) {
$r[$val->sport_id][$val->provider_group_id] = $val->competition_group_id;
if ($load_by_name) {
$r[$val->sport_id][$val->name] = $val->competition_group_id;
} else {
$r[$val->sport_id][$val->provider_group_id] = $val->competition_group_id;
}
}
return $r;