PHPackages                             rakshitbharat/supersu - 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. rakshitbharat/supersu

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

rakshitbharat/supersu
=====================

rakshitbharat/supersu is an utility package to enable developers to log in as other users during development.

v1.0(8y ago)4160MITPHPPHP &gt;=7.0

Since Nov 5Pushed 6y ago1 watchersCompare

[ Source](https://github.com/rakshitbharat/supersu)[ Packagist](https://packagist.org/packages/rakshitbharat/supersu)[ RSS](/packages/rakshitbharat-supersu/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

A Laravel 5.5 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 rakshitbharat/supersu

```

⚠️ *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('supersu::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 `supersu.php` should appear in your project. Within here, there are two configuration values.

**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.

```

Events:
-------

[](#events)

Below is events called before and after switching of user. You can replicate of below file to extend your logic.

```
