*/ use HasFactory; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'pricing' => ExtraPricing::class, 'is_active' => 'boolean', ]; } /** * @return BelongsTo */ public function property(): BelongsTo { return $this->belongsTo(Property::class); } /** * @param Builder $query * @return Builder */ #[Scope] protected function active(Builder $query): Builder { return $query->where('is_active', true); } }