hasMany(Preventivo::class); } public function getNominativoAttribute(): string { if ($this->ragione_sociale) { return $this->ragione_sociale; } return trim("{$this->nome} {$this->cognome}"); } }