matthewbdaly / laravel-impersonator
Impersonate other users to assist in resolving issues
0.0.1
2017-11-19 13:23 UTC
Requires (Dev)
- mockery/mockery: ^1.0
- orchestra/testbench: ^3.5
- phpunit/phpunit: ^6.4
- psy/psysh: ^0.8.14
- satooshi/php-coveralls: ^1.0
- squizlabs/php_codesniffer: ^3.1
This package is auto-updated.
Last update: 2024-11-28 07:46:06 UTC
README
Impersonate other users to assist in resolving issues
Installation
Run the following command to install the package:
composer require matthewbdaly/laravel-impersonator
Then just include this in your app/Http/Kernel.php
in the appropriate place where you want to import the middleware:
\Matthewbdaly\LaravelImpersonator\Http\Middleware\Impersonator::class
You can apply it globally, or only to specific routes as you wish. You will also need to add the trait Matthewbdaly\LaravelImpersonator\Eloquent\Traits\CanImpersonate
to your user model to add these methods:
startImpersonating($id)
- start impersonating user$id
stopImpersonating()
- stop impersonatingisImpersonating()
- Is user impersonating or not?