Bugfixes & Model for participants

This commit is contained in:
2026-02-17 21:58:55 +01:00
parent fcf41c5d13
commit b1c333648a
14 changed files with 334 additions and 56 deletions

View File

@@ -12,6 +12,7 @@ use App\Scopes\InstancedModel;
use DateTime;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
/**
* @property string $tenant
@@ -164,4 +165,8 @@ class Event extends InstancedModel
return $this->belongsToMany(User::class, 'event_managers', 'event_id', 'user_id')
->withTimestamps();
}
public function participants() : hasMany {
return $this->hasMany(EventParticipant::class);
}
}