PHPackages                             stechstudio/filament-impersonate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. stechstudio/filament-impersonate

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

stechstudio/filament-impersonate
================================

A Filament package to impersonate your users.

v5.1.0(2mo ago)3742.7M—8.2%100[1 PRs](https://github.com/stechstudio/filament-impersonate/pulls)20MITPHPCI passing

Since Mar 29Pushed 2mo ago8 watchersCompare

[ Source](https://github.com/stechstudio/filament-impersonate)[ Packagist](https://packagist.org/packages/stechstudio/filament-impersonate)[ RSS](/packages/stechstudio-filament-impersonate/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (4)Versions (60)Used By (20)

Filament Impersonate
====================

[](#filament-impersonate)

[![Latest Version on Packagist](https://camo.githubusercontent.com/668a960b05df87e884a852d586ac626c479ca780324d3fe898cf6d7a75364743/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f737465636873747564696f2f66696c616d656e742d696d706572736f6e6174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stechstudio/filament-impersonate)[![Total Downloads](https://camo.githubusercontent.com/7c81cc9da0f25c715ebe510e7a7e78123c6c2104651d871d53e9d5ea56165120/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f737465636873747564696f2f66696c616d656e742d696d706572736f6e6174652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/stechstudio/filament-impersonate)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

This is a plugin for [Filament](https://filamentphp.com/) that makes it easy to impersonate your users.

Installation
------------

[](#installation)

You know the drill:

```
composer require stechstudio/filament-impersonate
```

Quickstart
----------

[](#quickstart)

### 1. Add table action

[](#1-add-table-action)

First open the resource where you want the impersonate action to appear. This is generally going to be your `UserResource` class.

Go down to the `table` method. After defining the table columns, you want to add `Impersonate` as a new action for the table via `actions` method. Your class should look like this:

```
namespace App\Filament\Resources;

use Filament\Resources\Resource;
use STS\FilamentImpersonate\Actions\Impersonate;

class UserResource extends Resource {
    public static function table(Table $table)
    {
        return $table
            ->columns([
                // ...
            ])
            ->actions([
                Impersonate::make(), // guard('another-guard')
    ->redirectTo(route('some.other.route'));
```

### 2. Add the page action

[](#2-add-the-page-action)

Now open the page where you would want the button to appear, this will commonly be `EditUser`;

Go to the `getHeaderActions` method and add the `Impersonate` page action here.

```
