mapper wip
This commit is contained in:
1 parent
ba6c2263e3
commit
02712ec610
27 files changed
+1070
-158
No files matched your search
@@ -7,13 +7,13 @@ use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Sport extends Model
|
||||
{
|
||||
public static function map($field)
|
||||
public static function map($field, $_limit = [])
|
||||
{
|
||||
if (! in_array($field, ['bapi', 'bwin', 'b365', 'logi', 'magl'])) {
|
||||
Notice::note('Wrong Option! Possible options: bapi, bwin, b365, logi, magl', 'r', 1);
|
||||
Notice::note('Sport::map wrong option! Possible options: bapi, bwin, b365, logi, magl', 'r', 1);
|
||||
}
|
||||
|
||||
return Sport::where('is_active', 1)->pluck($field, 'id')->toArray();
|
||||
return Sport::where('is_active', 1)->whereNotIn('id', $_limit)->pluck($field, 'id')->toArray();
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user