wip relation manager :(

This commit is contained in:
salam committed 2026-01-31 19:02:15 +01:00
1 parent ae5b566231
commit 94a3c6c472
24 files changed
+318 -217

No files matched your search

+10 -5
View File
@@ -28,10 +28,10 @@ class Event extends Model
'away_id',
];
// protected static function booted(): void
// {
// static::addGlobalScope(new SportScope);
// }
protected static function booted(): void
{
static::addGlobalScope(new SportScope);
}
public function provider()
{
@@ -53,6 +53,11 @@ class Event extends Model
return $this->belongsTo(Group::class);
}
public function user_notes()
{
return $this->hasMany(UserNote::class, 'event_id', 'id');
}
public function competition_group()
{
return $this->belongsTo(CompetitionGroup::class);
@@ -140,7 +145,7 @@ class Event extends Model
public function event_user_star()
{
return $this->hasOne(EventUserStar::class, 'event_id', 'id')->where('user_id', auth()->user()->id);
return $this->hasOne(EventUserStar::class, 'event_id', 'id');
}
public function event_bookmaker()