Skip to main content

"Black Friday" Discount! Only until December 1st: 50% off all membership plans!

Read more here
Back to packages
2,344 GitHub stars

404labfr/laravel-impersonate

View on GitHub

Description

Makes it easy to authenticate as your users. Add a simple trait to your user model and impersonate as one of your users in one click.


Simple usage:

Impersonate a user:

Auth::user()->impersonate($other_user);
// You're now logged as the $other_user

Leave impersonation:

Auth::user()->leaveImpersonation();
// You're now logged as your original user.

Related Content on Laravel Daily

Video