'boolean', ]; /** * Get the human-readable label for the client type. */ public function getTypeLabel(): string { return match($this->type) { 'pompes_funebres' => 'Pompes funèbres', 'famille' => 'Famille', 'entreprise' => 'Entreprise', 'collectivite' => 'Collectivité', 'autre' => 'Autre', default => $this->type, }; } /** * Get the full billing address as a string. */ public function getBillingAddressAttribute(): ?string { $parts = array_filter([ $this->billing_address_line1, $this->billing_address_line2, $this->billing_postal_code ? $this->billing_postal_code . ' ' . $this->billing_city : $this->billing_city, $this->billing_country_code, ]); return !empty($parts) ? implode(', ', $parts) : null; } }