PHPackages                             summerblue/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. summerblue/sudo-su

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

summerblue/sudo-su
==================

A utility package for logging in as other users

1.1.2(8y ago)2170MITPHPPHP &gt;=7.0

Since Mar 14Pushed 8y ago1 watchersCompare

[ Source](https://github.com/summerblue-ext-forks/sudo-su)[ Packagist](https://packagist.org/packages/summerblue/sudo-su)[ RSS](/packages/summerblue-sudo-su/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)DependenciesVersions (5)Used By (0)

For from forked from  , has the following change:

1. fix `can not get property from a non-object` bug, after logout user;
2. limited user number;
3. only selected user;

[![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 summerblue/sudo-su

```

Selected user in .env file:

```
SUDO_USER_IDS=1,2,3

```

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

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~108 days

Total

4

Last Release

3024d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/51cb3ae1aea07b3464165fe83f8bb82011aeae2815c45da964b96d465a5019c6?d=identicon)[summer\_charlie](/maintainers/summer_charlie)

---

Top Contributors

[![mrterryh](https://avatars.githubusercontent.com/u/4132491?v=4)](https://github.com/mrterryh "mrterryh (14 commits)")[![summerblue](https://avatars.githubusercontent.com/u/324764?v=4)](https://github.com/summerblue "summerblue (5 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)")[![lex111](https://avatars.githubusercontent.com/u/4408379?v=4)](https://github.com/lex111 "lex111 (1 commits)")[![hrodrigues1984](https://avatars.githubusercontent.com/u/8711911?v=4)](https://github.com/hrodrigues1984 "hrodrigues1984 (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/summerblue-sudo-su/health.svg)

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

###  Alternatives

[highideas/laravel-users-online

This package will provide an online users management.

203113.2k1](/packages/highideas-laravel-users-online)[stephenjude/filament-blog

Filament Blog Builder

20317.8k](/packages/stephenjude-filament-blog)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11229.2k](/packages/datomatic-nova-detached-actions)

PHPackages © 2026

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