Files
nuhodds_fi4/app/Models/Sport.php
T
2025-12-19 15:32:23 +01:00

20 lines
493 B
PHP

<?php
namespace App\Models;
use App\Utilities\Notice;
use Illuminate\Database\Eloquent\Model;
class Sport extends Model
{
public static function map($field, $_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();
}
}