children->sum('amount'); } public function fee(): BelongsTo { return $this->belongsTo(Fee::class); } public function children(): HasMany { return $this->hasMany(SubscriptionChild::class, 'parent_id'); } public static function booted(): void { static::deleting(fn ($model) => $model->children()->delete()); } }