Impersonate Banner
A fixed banner that appears at the top of the Filament panel when an administrator is impersonating another user. Works with any Laravel impersonation package.
Setup
Enable impersonation on your panel plugin:
AuraFilamentPlugin::make()
->impersonate(true)
Optionally configure the "leave" URL:
AuraFilamentPlugin::make()
->impersonate(true)
->impersonateLeaveUrl('/admin/impersonate/leave')
Compatible Packages
The banner detects impersonation via session keys used by common packages:
| Package | Session Key |
|---|---|
| lab404/laravel-impersonate | impersonate |
| stechstudio/filament-impersonate | impersonated_by |
| Custom implementations | original_user_id |
If none of these session keys are present, the banner simply doesn't render — zero overhead.
Appearance
- Fixed amber-to-orange gradient bar at the top of the viewport
- Shows "Viewing as [email protected]"
- "Return to your account" button on the right
- Pushes the Filament layout down by 40px
- Slide-down animation on appear
- z-index 9998 (below modals, above everything else)