PHPackages                             nalewis75/laravel-impersonate - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. nalewis75/laravel-impersonate

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

nalewis75/laravel-impersonate
=============================

Login As A Different User Quickly

v1.2.2(5y ago)010MITPHPPHP ^7.1

Since Aug 3Pushed 5y agoCompare

[ Source](https://github.com/nalewis75/LaraPersonate)[ Packagist](https://packagist.org/packages/nalewis75/laravel-impersonate)[ RSS](/packages/nalewis75-laravel-impersonate/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (6)Used By (0)

[![Demonstration](demo.gif)](demo.gif)

Lara Personate
==============

[](#lara-personate)

Is a user impersonate for the laravel framework. allow a developer direct login as another user during development inspired by [sudo-su](https://github.com/viacreative/sudo-su).

Features
--------

[](#features)

- Displays users based their role.
- Limit the number of users displayed.
- Allows searching of the data for a given user.
- Search form using [tail.select](https://github.pytes.net/tail.select/).
- Auto discovery, no more setting up your ServiceProvider manually.
- Automatic injection via a middleware, no need to add some code to the blade.

Installation
------------

[](#installation)

To install the package, simply follow the steps below.

Install the package using Composer:

```
$ composer require nalewis75/laravel-impersonate

$ php artisan vendor:publish

```

Authorized Users
----------------

[](#authorized-users)

You can add a comma seperated list of user emails that are authorized to use Lara Personate.

Set the AUTHORIZED\_EMAILS in your .env file.

Lara Personate 1.2.x Upgrade Guide
----------------------------------

[](#lara-personate-12x-upgrade-guide)

Since there are many changes in the config and assets files in version 1.2.0, make sure to republish the package.

```
$ php artisan vendor:publish

```

And that's it!

Configuration
-------------

[](#configuration)

After running `vendor:publish`, a config file called `impersonate.php` should appear in your project.

Disclaimer - DANGER !
---------------------

[](#disclaimer---danger-)

This package can pose a serious security issue if used incorrectly, as anybody will be able to take control of any user's account. Please ensure that the service provider is only registered when the app is in a debug/local environment.

By default, the package will disable itself on any domains that don't have a TLD of .dev or .local. This is a security measure to reduce the risk of accidentally enabling the package in production.

By using this package, you agree that Octopy ID and the contributors of this package cannot be held responsible for any damages caused by using this package.

Security
--------

[](#security)

If you discover any security related issues, please email  or  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Supian M](https://github.com/SupianIDz)
- [sudo-su](https://github.com/viacreative/sudo-su)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/SupianIDz/LaraPersonate/blob/master/LICENSE) for more information.

To Do
-----

[](#to-do)

- Unit tests
- UI improvement
- Showing users with their role based on 3rd library like Laratrust, Bouncer and others.
    - [Laratrust](https://github.com/santigarcor/laratrust)
    - [Bouncer](https://github.com/JosephSilber/bouncer)
    - [Permission](https://github.com/spatie/laravel-permission)

Change Logs
-----------

[](#change-logs)

### v1.2.2

[](#v122)

- Exclude Lara Personate from json response.

### v1.2.1

[](#v121)

- Exclude Lara Personate from ajax requests.

### v1.2.0

[](#v120)

- Rewrite code.
- Added sign out button.
- Added a new feature to display users by the role according to third party packages.

### v1.1.0

[](#v110)

- Add custom fields for user\_model.
- Rename package, from laravel-sudo to laravel-impersonate.

### v1.0.0

[](#v100)

- Initial Release.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~6 days

Total

5

Last Release

2085d ago

PHP version history (2 changes)v1.0.0PHP ^7.0

v1.2.0PHP ^7.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/22083562?v=4)[Nick](/maintainers/nalewis)[@nalewis](https://github.com/nalewis)

---

Top Contributors

[![SupianIDz](https://avatars.githubusercontent.com/u/37969970?v=4)](https://github.com/SupianIDz "SupianIDz (15 commits)")[![redglassdev](https://avatars.githubusercontent.com/u/14917734?v=4)](https://github.com/redglassdev "redglassdev (2 commits)")

### Embed Badge

![Health badge](/badges/nalewis75-laravel-impersonate/health.svg)

```
[![Health](https://phpackages.com/badges/nalewis75-laravel-impersonate/health.svg)](https://phpackages.com/packages/nalewis75-laravel-impersonate)
```

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
