*/ use HasFactory, MustVerifyEmail, Notifiable; public function canAccessPanel(Panel $panel): bool { return $this->is_active && $this->hasVerifiedEmail(); } public function isAdmin(): bool { return $this->role === UserRole::Admin; } /** * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', 'role' => UserRole::class, 'is_active' => 'boolean', ]; } }