add staff remove & staff invite test

This commit is contained in:
2020-08-15 12:13:09 +02:00
parent 0b9229d966
commit 92d83d9f9a
7 changed files with 111 additions and 11 deletions

View File

@@ -115,7 +115,7 @@ class User extends Authenticatable
public function invitedEvent(): BelongsToMany
{
return $this->belongsToMany(Event::class, 'event_guest')
return $this->belongsToMany(Event::class, 'event_guest', 'user_id', 'event_id')
->withPivot('is_staff', 'validated_at')
->withTimestamps();
}