PHPackages                             linson2016/sudo-su - 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. linson2016/sudo-su

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

linson2016/sudo-su
==================

A utility package for logging in as other users

1.2.1(5y ago)015MITPHPPHP &gt;=7.0

Since Mar 14Pushed 5y agoCompare

[ Source](https://github.com/linson2016/sudo-su)[ Packagist](https://packagist.org/packages/linson2016/sudo-su)[ RSS](/packages/linson2016-sudo-su/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (10)Used By (0)

[![Demonstration](https://camo.githubusercontent.com/2d0dc8993fea73e109cf658a62936ff9290afdb6101664291dad85dab4f7fdff/68747470733a2f2f6437387667673472656c68776b2e636c6f756466726f6e742e6e65742f7375646f2d73752e676966)](https://camo.githubusercontent.com/2d0dc8993fea73e109cf658a62936ff9290afdb6101664291dad85dab4f7fdff/68747470733a2f2f6437387667673472656c68776b2e636c6f756466726f6e742e6e65742f7375646f2d73752e676966)

[![Licence: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)

A Laravel 5.4 utility package to enable developers to log in as other users during development.

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

[](#installation)

To install the package, simply follow the steps below.

Install the package using Composer:

```
$ composer require linson2016/sudo-su

```

Add the package's service provider to your app in your project's `AppServiceProvider`:

```
class AppServiceProvider extends ServiceProvider
{
    public function register()
    {
        if (config('app.debug')) {
            $this->app->register('VIACreative\SudoSu\ServiceProvider');
        }
    }
}
```

⚠️ *Warning:* You should not register the provider globally like usual in the `config/app.php` file. View the disclaimer [here](#disclaimer---danger) for more information.

Include the partial in your layout file.

```
@if (config('app.debug'))
    @include('sudosu::user-selector')
@endif
```

Finally, publish the package's assets (the package won't work without this):

```
$ php artisan vendor:publish

```

Config
------

[](#config)

After running `vendor:publish`, a config file called `sudosu.php` should appear in your project. Within here, there are two configuration values:

**sudosu.allowed\_tlds `array`**

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. If you have a different TLD in development, you can edit the config option `sudosu.allowed_tlds`.

**sudosu.user\_model `string`**

The path to the application User model. This will be used to retrieve the users displayed in the select dropdown. This must be an Eloquent Model instance. This is set to `App\User` by default.

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. If you have a different TLD in development, you can edit the config option `sudosu.allowed_tlds`.

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

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 58.3% 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 ~453 days

Total

4

Last Release

1992d ago

### Community

Maintainers

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

---

Top Contributors

[![mrterryh](https://avatars.githubusercontent.com/u/4132491?v=4)](https://github.com/mrterryh "mrterryh (14 commits)")[![krve](https://avatars.githubusercontent.com/u/5139119?v=4)](https://github.com/krve "krve (5 commits)")[![amaelftah](https://avatars.githubusercontent.com/u/17250137?v=4)](https://github.com/amaelftah "amaelftah (2 commits)")[![hrodrigues1984](https://avatars.githubusercontent.com/u/8711911?v=4)](https://github.com/hrodrigues1984 "hrodrigues1984 (1 commits)")[![lex111](https://avatars.githubusercontent.com/u/4408379?v=4)](https://github.com/lex111 "lex111 (1 commits)")[![viacreativedev](https://avatars.githubusercontent.com/u/21076632?v=4)](https://github.com/viacreativedev "viacreativedev (1 commits)")

---

Tags

laraveldebugging

### Embed Badge

![Health badge](/badges/linson2016-sudo-su/health.svg)

```
[![Health](https://phpackages.com/badges/linson2016-sudo-su/health.svg)](https://phpackages.com/packages/linson2016-sudo-su)
```

###  Alternatives

[viacreative/sudo-su

A utility package for logging in as other users

546143.7k](/packages/viacreative-sudo-su)[imdhemy/laravel-purchases

The top-notch Laravel receipt validator.

3831.1M2](/packages/imdhemy-laravel-purchases)[martbock/laravel-diceware

Diceware Passphrase Generator for Laravel

3264.7k](/packages/martbock-laravel-diceware)[orchestra/auth

Auth Component for Orchestra Platform

24108.5k3](/packages/orchestra-auth)[ingria/laravel-x509-auth

Laravel 5 Client Certificate auth middleware

375.6k](/packages/ingria-laravel-x509-auth)

PHPackages © 2026

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