ComparingBookmakerMenu ok
This commit is contained in:
1 parent
be80128226
commit
f59ac10c2a
17 files changed
+272
-317
No files matched your search
@@ -14,7 +14,6 @@ class ComparingBookmaker extends Model
|
||||
'time_lastcheck',
|
||||
'margin_threshold',
|
||||
'is_active',
|
||||
'is_hidden',
|
||||
'sorting',
|
||||
];
|
||||
|
||||
|
||||
@@ -28,6 +28,11 @@ class Sport extends Model
|
||||
}
|
||||
}
|
||||
|
||||
public static function getActiveSports()
|
||||
{
|
||||
return Sport::query()->where('is_active', 1)->pluck('id')->toArray();
|
||||
}
|
||||
|
||||
public static function getSportForClient()
|
||||
{
|
||||
$user = User::find(auth()->user()->id);
|
||||
@@ -37,12 +42,4 @@ class Sport extends Model
|
||||
return Sport::query()->whereIn('id', $sports)->pluck('name', 'id');
|
||||
|
||||
}
|
||||
|
||||
public static function getSportId()
|
||||
{
|
||||
$user = User::find(auth()->user()->id);
|
||||
|
||||
return $user->sport_id;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -176,4 +176,9 @@ class User extends Authenticatable implements FilamentUser, HasAppAuthentication
|
||||
{
|
||||
return Bookmaker::where('id', auth()->user()->bookmaker_id)->select('id', 'name', 'icon', 'svg')->first();
|
||||
}
|
||||
|
||||
public static function getUser()
|
||||
{
|
||||
return User::find(auth()->user()->id);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user