comparing bookmaker wip
This commit is contained in:
1 parent
de95867692
commit
be80128226
11 files changed
+237
-93
No files matched your search
@@ -27,4 +27,22 @@ class Sport extends Model
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static function getSportForClient()
|
||||
{
|
||||
$user = User::find(auth()->user()->id);
|
||||
|
||||
$sports = Client::where('id', $user->client_id)->value('sport');
|
||||
|
||||
return Sport::query()->whereIn('id', $sports)->pluck('name', 'id');
|
||||
|
||||
}
|
||||
|
||||
public static function getSportId()
|
||||
{
|
||||
$user = User::find(auth()->user()->id);
|
||||
|
||||
return $user->sport_id;
|
||||
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user