wip relation manager :(
This commit is contained in:
1 parent
ae5b566231
commit
94a3c6c472
24 files changed
+318
-217
No files matched your search
+10
-5
@@ -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()
|
||||
|
||||
Reference in new issue
Block a user