*/ use HasFactory, Notifiable; /** * Check if user is an admin. */ public function isAdmin(): bool { return $this->role === 'admin'; } /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', ]; } }