PhoneNumberCast::class, ]; public function clients(): BelongsToMany { return $this->belongsToMany(Client::class); } public function invoices(): Builder { return Invoice::whereIn('client_id', $this->clients()->pluck('clients.id')); } protected function fullName(): Attribute { return Attribute::make( get: fn (mixed $value, array $attributes) => $attributes['first_name'].' '.$attributes['last_name'], ); } }