This commit is contained in:
salam committed 2026-02-06 07:18:53 +01:00
1 parent 23cf804865
commit 4e77862aa7
14 files changed
+113 -49

No files matched your search

+6 -2
View File
@@ -11,8 +11,7 @@ class AlarmSetting extends Model
'sport_id',
'disabled',
'multiline_setting_id',
'name',
'level_id',
'alarm_level_id',
'alarm_threshold',
];
@@ -25,4 +24,9 @@ class AlarmSetting extends Model
{
return $this->belongsTo(Sport::class);
}
public function alarm_level()
{
return $this->belongsTo(AlarmLevel::class);
}
}
+5
View File
@@ -23,6 +23,11 @@ class Bookmaker extends Model
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 = [];
+5
View File
@@ -24,4 +24,9 @@ class PersonalNotification extends Model
{
return $this->belongsTo(Bookmaker::class);
}
public function alarm_level()
{
return $this->belongsTo(AlarmLevel::class);
}
}
+2 -2
View File
@@ -33,9 +33,9 @@ class Sport extends Model
return Sport::query()->where('is_active', 1)->pluck('id')->toArray();
}
public static function getSportForClient()
public static function getSportForClient($client_id)
{
$sports = Client::where('id', auth()->user()->client_id)->value('sport');
$sports = Client::where('id', $client_id)->value('sport');
return Sport::query()->whereIn('id', $sports)->pluck('name', 'id');