Skip to content

matthewbdaly/laravel-impersonator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-impersonator

Build Status Coverage Status

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 impersonating
  • isImpersonating() - Is user impersonating or not?

About

Impersonate other users to assist in resolving issues

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages