table counts added

This commit is contained in:
Benjamin Takats
2022-12-01 22:42:49 +01:00
parent ff498d2c5b
commit b658e5e66e
7 changed files with 43 additions and 8 deletions

View File

@@ -44,4 +44,14 @@ class City extends Model
{
return $this->belongsTo(Country::class);
}
public function venues(): \Illuminate\Database\Eloquent\Relations\HasMany
{
return $this->hasMany(Venue::class);
}
function events()
{
return $this->hasManyThrough(Event::class, Venue::class);
}
}