*/ public const ADMIN_TIER_ROLES = ['super_admin', 'admin', 'support']; /** @use HasFactory */ use HasApiTokens, HasFactory, HasRoles, Notifiable; public function canAccessPanel(Panel $panel): bool { return $this->hasAnyRole(self::ADMIN_TIER_ROLES); } /** * A customer's bookings (domain.md §1) — inverse of Booking::user(). * Staff (admin-tier role) users don't create bookings, so this is * effectively customer-only in practice, but not enforced here. */ public function bookings(): HasMany { return $this->hasMany(Booking::class); } /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ 'name', 'email', 'password', ]; /** * The attributes that should be hidden for serialization. * * @var list */ protected $hidden = [ 'password', 'remember_token', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'email_verified_at' => 'datetime', 'password' => 'hashed', ]; } }