*/ use HasFactory, HasUuids, SoftDeletes; protected $fillable = [ 'name', 'color', 'user_id', ]; /** @return BelongsTo */ public function user(): BelongsTo { return $this->belongsTo(User::class); } public function transactions(): BelongsToMany { return $this->belongsToMany(Transaction::class) ->using(LabelTransaction::class) ->withTimestamps(); } public function automationRules(): BelongsToMany { return $this->belongsToMany(AutomationRule::class, 'automation_rule_labels') ->using(AutomationRuleLabel::class); } }