belongsTo(Customer::class); } public function invoices(): BelongsToMany { return $this->belongsToMany(Invoice::class) ->withPivot('applied_amount') ->withTimestamps(); } }