wip del err
This commit is contained in:
1 parent
812736ca9a
commit
9bcd4432c6
1210 files changed
-220941
No files matched your search
@@ -1,44 +0,0 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user