rapper magloo nigeria fixtures ok

This commit is contained in:
salam committed 2026-01-03 12:29:17 +01:00
1 parent 34690292aa
commit 9e7384daf8
46 files changed
+334 -1502

No files matched your search

+14 -3
View File
@@ -7,13 +7,24 @@ use Illuminate\Database\Eloquent\Model;
class Sport extends Model
{
public static function map($field, $_limit = [])
public static function map($field, $reverse = false, $limit = [])
{
if (! in_array($field, ['bapi', 'bwin', 'b365', 'logi', 'magl'])) {
Notice::note('Sport::map wrong option! Possible options: bapi, bwin, b365, logi, magl', 'r', 1);
}
return Sport::where('is_active', 1)->whereNotIn('id', $_limit)->pluck($field, 'id')->toArray();
if ($reverse) {
if ($limit) {
return Sport::where('is_active', 1)->whereIn('id', $limit)->pluck('id', $field)->toArray();
} else {
return Sport::where('is_active', 1)->pluck('id', $field)->toArray();
}
} else {
if ($limit) {
return Sport::where('is_active', 1)->whereIn($limit, 'id')->pluck('id', $field)->toArray();
} else {
return Sport::where('is_active', 1)->pluck($field, 'id')->toArray();
}
}
}
}