Codacy Badge StyleCI License Total Downloads Latest Stable Version

User impersonation dependency for Laravel Enso.

Watch the demo click on the photo to view a short demo in compatible browsers


  • allows a user to impersonate another user, by using a middleware
  • permits testing and debugging from the perspective of another user, without needing his credentials
  • comes with its own controller and routes that permit starting and stopping the impersonation process
  • depends on Permission Manager in order to be able to verify permissions

Installation Steps

  1. Run the migrations php artisan migrate

  2. Use the Impersonate trait inside your user model - as this will allow the middleware to work correctly

  3. Use the api/core/impersonate/{user} and api/core/impersonate/stop routes to start, respectively stop the impersonation


The access for the impersonation process is determined by the (admin) user's access to the impersonation routes.

The Laravel Enso Core package comes with this package included.