New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

packstub/filament-account-switcher

Switch between accounts in Filament: impersonate users, linked sub-accounts with password-confirmed escalation, and one-click developer logins. The panel UI of packstub/account-switcher.
4,331 47

Larablocks Analysis

packstub/filament-account-switcher works with Laravel 12 and 13 (latest release v4.4.0, Oct 28, 2026).

Laravel 9, 10 and 11 in earlier releases.

Recommendation checks

Solid choice

Solid choice: maintained and up to date, meets 2 of 4 checks; below the bar for Recommended on use.

  • Works with Laravel 13, the current version
  • Released in the last 12 months (Oct 28, 2026)
  • 2,480 downloads a month (needs 10,000)
  • 47 GitHub stars (needs 100)

State

Actively maintained
  • Last stable release: Oct 28, 2026.
  • 12 releases in the last 12 months.
  • First released: Oct 26, 2022.
  • Monthly downloads: 2,480.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 28, 2026.

Install
composer require packstub/filament-account-switcher
Latest Version:v4.4.0
PHP:^8.2
Laravel:12 · 13
Older releases:9 · 10 · 11
License:MIT
Last Updated:Nov 25, 2026
Links: GitHub  ·  Packagist
Maintainer: icaliman

Filament Account Switcher

Filament Account Switcher — switch accounts, never sign out

Latest Version on Packagist Tests Total Downloads License Listed on filamentphp.com Sponsor

Switch between accounts in a Filament panel without signing out — safely, in production. The panel UI of Account Switcher for Laravel, which does the same in any Laravel app.

Filament Account Switcher: the admin impersonates a user from the users table, the banner says so, Switch back returns in one click, then the Switch to menu lists the linked accounts

Features

  • Linked accounts: work from a low-privilege account and switch up to admin only when you need it.
  • Impersonation: an action for your users table, a banner with Switch back, rules on your model.
  • Developer logins: one-click sign-in buttons for your seeded accounts, on the login page and in the "Switch to" menu (searchable, tagged, or any account in the database), only in the environments you allow.
  • Audit trail: every switch logged with who, why, from where and any context you attach, plus events and a log() call for switches made elsewhere.
  • Configurable per panel: turn each feature on or off, add your own rules, move the banner.
  • Dark mode and translations: built from Filament components, every string in a language file.

Formerly xlite-dev/filament-impersonate — see the upgrade guide.

Compatibility

Plugin Filament Laravel PHP
4.1+ (with packstub/account-switcher 1.x) 4.x, 5.x 12.x, 13.x 8.2+
4.0 4.x, 5.x 12.x, 13.x 8.2+
3.x (xlite-dev/filament-impersonate) 4.x, 5.x 9.x – 12.x 8.1+

Installation

composer require packstub/filament-account-switcher
php artisan packstub-account-switcher:install

Add the trait to your user model and the plugin to your panel:

use Packstub\AccountSwitcher\Concerns\HasLinkedAccounts;

class User extends Authenticatable implements FilamentUser
{
    use HasLinkedAccounts;

    public function canImpersonate(User $target): bool
    {
        return $this->hasRole('super-admin');
    }
}
use Packstub\AccountSwitcher\AccountSwitcherPlugin;

$panel->plugin(
    AccountSwitcherPlugin::make()
        ->developerLogins(['admin@example.com', 'user@example.com']),
);

Only need impersonation and developer logins? Add ->withoutDatabase() to the plugin and skip the install command: no migrations, no trait (without migrations).

Full walkthrough: Installation.

Linked accounts

Link the accounts one person owns. A Switch to menu next to the user menu lists them with their label and e-mail.

The Switch to menu listing the linked accounts

Switching down to a lower-privilege account is one click. Switching up asks for the target account's password, so a compromised daily session can never reach the admin account on its own.

Switching up to the admin account asks for its password

The Linked accounts page (in the user menu) links an existing account, creates a sub-account, renames links and sets the per-link password rule.

The Linked accounts page

// Or link programmatically — one click down, password up
$admin->linkAccount($daily, label: 'Daily', requiresPassword: false);

Read more: Linked accounts · Security model.

Impersonation

Drop ImpersonateAction into your users table or a page header. It is hidden for records the current user may not impersonate, based on canImpersonate() / canBeImpersonated() on your model.

use Packstub\AccountSwitcher\Filament\Actions\ImpersonateAction;

->recordActions([
    ImpersonateAction::make(),
])

The Impersonate action on each row of the users table

While impersonating, a banner stays visible on every page with a Switch back button and a ⋮ menu for your own links. With Filament Session Replay on the panel the menu offers Session replays: switch back and land on that person's recordings.

The impersonation banner with a Switch back button and a ⋮ menu

Read more: Impersonation.

Developer logins

One-click sign-in for the accounts you seed, shown under the login form. They only render in the environments listed in the config (local by default), whatever the panel says.

AccountSwitcherPlugin::make()
    ->developerLogins(['admin@example.com', 'user@example.com'])

Developer login buttons under the login form

Read more: Developer logins.

Configuration

AccountSwitcherPlugin::make()
    ->impersonation()                                  // on by default
    ->linkedAccounts()                                 // on by default
    ->developerLogins(['admin@example.com'])           // off by default
    ->canImpersonateUsing(fn (User $by, User $target) => $by->can('impersonate', $target))
    ->canSwitchUsing(fn (User $from, User $to) => ! $to->is_locked)
    ->banner(position: 'top', style: 'light')
    ->redirectTo('/admin')

Read more: Configuration — the config file, events, the switch log and the AccountSwitcher facade.

Documentation

The same pages live in the docs/ directory of this repository.

Testing

composer test

Changelog

See the changelog.

Security vulnerabilities

Please e-mail support@packstub.dev rather than opening a public issue.

Credits

License

MIT. See the license file.

Alternatives to packstub/filament-account-switcher

franbarbalopez/mirror

Mirror is a Laravel package that handles user impersonation.

71,758 162
solutionforest/filament-drilldown-nav

Drill-down sidebar navigation for Filament v5 panels: one level at a time, a men...

975 2
usamamuneerchaudhary/filament-model-states

State-machine-aware timeline and Kanban board components for Filament, built on...

1,915 8
israrminhas/filament-aimonitor

AI API cost monitoring and key management plugin for Filament v4 & v5

3,678 10
marcelodelgado/filament-announcements

Filament v5 plugin for institutional announcements on the admin dashboard

3,730 7

Version History

Version Released PHP Laravel License
v4.4.0 ^8.2 ^12.0 || ^13.0 MIT
v4.3.0 ^8.2 ^12.0 || ^13.0 MIT
v4.2.1 ^8.2 ^12.0 || ^13.0 MIT
v4.2.0 ^8.2 ^12.0 || ^13.0 MIT
v4.1.0 ^8.2 ^12.0 || ^13.0 MIT
Pre-releases (2)
Version Released PHP Laravel License
2.0.0-beta2 ^8.0 ^9.0|^10.0 MIT
2.0.0-beta1 ^8.0 ^9.0|^10.0 MIT