j84115/impersonate
Simple Laravel package to temporarily impersonate other users via /impersonate/login/{user_id} and /impersonate/logout. Add service provider, implement ImpersonateUser on your User model to define who can impersonate and who can be impersonated, then register Route::impersonate().
impersonator()/impersonatable()).impersonator()/impersonatable() logic or debug session issues.For Executives: "This package lets admins temporarily ‘become’ other users to debug issues or test workflows—like a ‘view as’ button for your app. It’s a 1-hour implementation that replaces manual credential sharing (a security risk) and speeds up support. For example, if a customer reports a checkout error, an admin can impersonate them to reproduce it live. We’d restrict it to admins only, and add logging later if needed. Trade-off: minimal upfront cost vs. building this from scratch."
For Engineering: *"Pros:
impersonator()/impersonatable() for custom rules.Cons:
Log facade).Recommendation: Use for admin tools; pair with a feature flag to disable in production if needed."*
How can I help you explore Laravel packages today?