'datetime', 'password' => 'hashed', 'password_change_required' => 'boolean', ]; } public function getActivitylogOptions(): LogOptions { return LogOptions::defaults() ->logOnly(['name', 'email']) ->logOnlyDirty() ->dontSubmitEmptyLogs(); } protected static function booted(): void { // Un indirizzo nuovo va confermato di nuovo, chiunque lo cambi. static::updating(function (self $utente) { if ($utente->isDirty('email') && ! $utente->isDirty('email_verified_at')) { $utente->email_verified_at = null; } }); } /** * Manda l'email di conferma; false se il server di posta non risponde o * rifiuta. Chi chiama decide cosa dire: l'utente è comunque salvato, e * l'email si può richiedere di nuovo. */ public function inviaConfermaEmail(): bool { try { $this->sendEmailVerificationNotification(); } catch (\Throwable $e) { report($e); return false; } return true; } }