'date', 'status' => ClientStatus::class, ]; public function contacts(): BelongsToMany { return $this->belongsToMany(Contact::class) ->withPivot('is_primary'); } public function primaryContact(): BelongsToMany { return $this->belongsToMany(Contact::class) ->wherePivot('is_primary', true) ->withPivot('is_primary'); } public function invoices(): HasMany { return $this->hasMany(Invoice::class); } public function secondaryContacts(): BelongsToMany { return $this->belongsToMany(Contact::class) ->wherePivot('is_primary', false) ->withPivot('is_primary'); } }