*/ protected $fillable = [ 'name', 'location', 'description', 'status', 'capacity', 'surface_type', 'indoor', 'dimensions', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'indoor' => 'boolean', 'dimensions' => 'array', ]; /** * Get the competitions that use this field. */ public function competitions(): BelongsToMany { return $this->belongsToMany(Competition::class) ->withTimestamps(); } /** * Get the matches scheduled on this field. */ public function matches(): HasMany { return $this->hasMany(MatchGame::class); } /** * Get the break periods scheduled on this field. */ public function breakPeriods(): HasMany { return $this->hasMany(BreakPeriod::class); } }