devmi / impersonate
Flexible impersonating laravel package.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
pkg:composer/devmi/impersonate
Requires
- php: >=7.0.0
- illuminate/support: >=5.0
This package is auto-updated.
Last update: 2025-10-21 23:19:56 UTC
README
Flexible impersonating Laravel package.
stage 1
first of all pull the package through Composer.
composer require devmi/impersonate
Next, if you're using older Laravel version than 5.5, include the service provider within your config/app.php file.
(otherwise ignore this step)
'providers' => [ Devmi\Impersonate\ImpersonateServiceProvider::class, ];
Stage 2
Add the middleware to App\Http\Middleware\Kernel.php
protected $middlewareGroups = [ ... \Devmi\Impersonate\Middleware\Impersonate::class, ]
Stage 3
Public the configuration so you can custom this package depending on your needs.
php artisan vendor:publich --tag=impersonate
The file generated would be found under config/impersonate.php
Usage
You can visit http://your-domain/admin/impersonate.
Enter the user email address you want to impersonate and you're done.
Note
@impersonatingblade directive is already provided so you can displaystop impersonatingbutton to quit the impersonation.
Hit
route('impersonate.destroy')to destroy your impersonation session.
That's it.
Contributing
PR's are very welcome, Thanks.