'hashed', ]; public function preventivi(): HasMany { return $this->hasMany(Preventivo::class); } public function getNominativoAttribute(): string { if ($this->ragione_sociale) { return $this->ragione_sociale; } $nome = trim("{$this->nome} {$this->cognome}"); return $nome !== '' ? $nome : $this->username; } }