This commit is contained in:
salam committed 2026-10-04 15:25:03 +02:00
1 parent 9bcd4432c6
commit 6f92f9e1d5
1209 files changed
+220940

No files matched your search

+44
View File
@@ -0,0 +1,44 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Bookmaker extends Model
{
protected $fillable = [
'name',
'icon',
'image',
'baid',
'txso',
'txot',
'betsapi',
'direct',
'is_active',
];
public function sport()
{
return $this->belongsTo(Sport::class)->where('is_active', 1);
}
public static function options($arr = [])
{
return Bookmaker::query()->whereIn('id', $arr)->pluck('name', 'id');
}
public static function map()
{
$arr = [];
$res = Bookmaker::query()->where('is_active', 1)->get();
foreach ($res as $value) {
$arr[$value->id] = [
'name' => $value->name,
'icon' => $value->icon,
];
}
return $arr;
}
}