filters ok
This commit is contained in:
1 parent
8e9bb0eacb
commit
98d92b2ee3
16 files changed
+365
-189
No files matched your search
@@ -28,16 +28,9 @@ 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);
|
||||
|
||||
$sports = Client::where('id', $user->client_id)->value('sport');
|
||||
$sports = Client::where('id', auth()->user()->client_id)->value('sport');
|
||||
|
||||
return Sport::query()->whereIn('id', $sports)->pluck('name', 'id');
|
||||
|
||||
|
||||
Reference in new issue
Block a user