PHPackages                             visanduma/laravel-auth-switch - 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. visanduma/laravel-auth-switch

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

visanduma/laravel-auth-switch
=============================

Simple user switch for development environment

v0.1.1(3y ago)05082MITBladePHP ^7.3|^8.0CI failing

Since Jan 25Pushed 2y ago2 watchersCompare

[ Source](https://github.com/Visanduma/laravel-auth-switch)[ Packagist](https://packagist.org/packages/visanduma/laravel-auth-switch)[ Docs](https://github.com/visanduma/laravel-auth-switch)[ GitHub Sponsors](https://github.com/Visanduma)[ RSS](/packages/visanduma-laravel-auth-switch/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (8)Versions (3)Used By (0)

Laravel Auth Switch
===================

[](#laravel-auth-switch)

[![Latest Version on Packagist](https://camo.githubusercontent.com/690eb773803caf938d53b927fb6a0fbe0e28d125c04e7ac39db2942e18473294/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f766973616e64756d612f6c61726176656c2d617574682d7377697463682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/visanduma/laravel-auth-switch)[![GitHub Tests Action Status](https://camo.githubusercontent.com/413c80d66f9b1753e5f3db8294c9aaf6769ce2c58c62f7455051f1a83617e6c7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f766973616e64756d612f6c61726176656c2d617574682d7377697463682f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/visanduma/laravel-auth-switch/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/abc7d3ef8f9048f4dbcc951df549f02d8da55ac269ffadb991f352def278e299/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f766973616e64756d612f6c61726176656c2d617574682d7377697463682f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/visanduma/laravel-auth-switch/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/1ba157393ca56175406def7fba34f16e1a8f4238f5edd548ace0c6f805b35eb1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f766973616e64756d612f6c61726176656c2d617574682d7377697463682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/visanduma/laravel-auth-switch)

Simple User switch for development environment

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

[](#installation)

You can install the package via composer:

```
composer require visanduma/laravel-auth-switch
```

You can publish the config file with:

```
php artisan vendor:publish --tag="auth-switch-config"
```

This is the contents of the published config file:

```
return [

    // username column of user table
    'username_column' => 'email',

    // auth able user model
    'model' => \App\Models\User::class,

    // switch able user accounts according to your user table
    'accounts' => [
        [
            'name' => 'Affiliate',
            'username' => 'alexie.runolfsson@example.org',
            'redirect_to' => 'affiliate/dashboard' // redirect to this url after login
        ],
        [
            'name' => 'Broker',
            'username' => 'dojyxisero@mailinator.com',
            'redirect_to' => 'brokers/dashboard'
        ],
];
```

Usage
-----

[](#usage)

Include into any view where you need Auth Switching

```
@include('auth-switch::button');
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Visanduma](https://github.com/Visanduma)
- [LaHiRu](https://github.com/lahirulhr)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~112 days

Total

2

Last Release

1454d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/30f6d3c78c26dd226777b19b659363509fe92a95a682fbfcba13eda64060b591?d=identicon)[dumithrathnayaka](/maintainers/dumithrathnayaka)

---

Top Contributors

[![lahirulhr](https://avatars.githubusercontent.com/u/13136764?v=4)](https://github.com/lahirulhr "lahirulhr (14 commits)")

---

Tags

laravelVisandumalaravel-auth-switch

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/visanduma-laravel-auth-switch/health.svg)

```
[![Health](https://phpackages.com/badges/visanduma-laravel-auth-switch/health.svg)](https://phpackages.com/packages/visanduma-laravel-auth-switch)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k89.8M1.0k](/packages/spatie-laravel-permission)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[jeffgreco13/filament-breezy

A custom package for Filament with login flow, profile and teams support.

1.0k1.7M41](/packages/jeffgreco13-filament-breezy)[spatie/laravel-login-link

Quickly login to your local environment

4381.2M1](/packages/spatie-laravel-login-link)[ryangjchandler/laravel-cloudflare-turnstile

A simple package to help integrate Cloudflare Turnstile.

438896.6k2](/packages/ryangjchandler-laravel-cloudflare-turnstile)[spatie/laravel-passkeys

Use passkeys in your Laravel app

444494.4k16](/packages/spatie-laravel-passkeys)

PHPackages © 2026

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