PHPackages                             wuifdesign/laravel-multiauth - 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. wuifdesign/laravel-multiauth

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

wuifdesign/laravel-multiauth
============================

MultiAuth integration for Laravel

v0.3.5(10y ago)78923MITPHPPHP &gt;=5.4.0

Since Aug 16Pushed 10y ago2 watchersCompare

[ Source](https://github.com/wuifdesign/laravel-multiauth)[ Packagist](https://packagist.org/packages/wuifdesign/laravel-multiauth)[ RSS](/packages/wuifdesign-laravel-multiauth/feed)WikiDiscussions master Synced 1mo ago

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

Laravel MultiAuth
-----------------

[](#laravel-multiauth)

[![GitHub release](https://camo.githubusercontent.com/f67c8b701346234cfb4c6c440fe1cbde8c368be6ade0310ab707f1b2b5fffcdd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7461672f7775696664657369676e2f6c61726176656c2d6d756c7469617574682e737667)](https://github.com/wuifdesign/laravel-multiauth)[![Packagist](https://camo.githubusercontent.com/517e74f4791b8096390b42720cf9adfedd4fbc3c61732cebe52634e445016503/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7775696664657369676e2f6c61726176656c2d6d756c7469617574682e737667)](https://packagist.org/packages/wuifdesign/laravel-multiauth)[![License](https://camo.githubusercontent.com/c9a6d6adbb35a99c68c0dc532292ddfaf6be0408cc22cb4dbd4a90a69ab5a14f/68747470733a2f2f706f7365722e707567782e6f72672f7775696664657369676e2f6c61726176656c2d6d756c7469617574682f6c6963656e7365)](https://github.com/wuifdesign/laravel-multiauth/blob/master/LICENSE)

[![Twitter](https://camo.githubusercontent.com/fc9ab934690fab3b7026864c96d0633cd51cf2efd944c06d1dbc0b6689eb17e3/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f75726c2f68747470732f6769746875622e636f6d2f7775696664657369676e2f6c61726176656c2d6d756c7469617574682e7376673f7374796c653d736f6369616c)](https://twitter.com/intent/tweet?text=Wow:&amp;url=https%3A%2F%2Fgithub.com%2Fwuifdesign%2Flaravel-multiauth)

**Laravel**: 5.0, 5.1

This Package extends the default Auth library to allow logging in with accounts from different database tables or even different databases. For example if you want to save your backend and a frontend users in a different table to keep them separated.

**Works with the default Laravel 5 AuthController and PasswordController!**

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

[](#installation)

The easiest way is to run the following command:

```
composer require wuifdesign/laravel-multiauth

```

Otherwise you can include the package in your `composer.json` file,

```
"require": {
    "wuifdesign/laravel-multiauth": "0.3.*"
}

```

and update or install via composer:

```
composer update

```

Now you have to open up your `app/config/app.php` and add

```
'providers' => [
    ...
    WuifDesign\MultiAuth\ServiceProvider::class
]

```

Configuration is pretty easy too, take `app/config/auth.php` with its default values

```
return array(

    'driver' => 'eloquent',
    'model' => 'User',
    'table' => 'users',

    'password' => array(
        'email' => 'emails.password',
        'table' => 'password_reminders',
        'expire' => 60,
    ),

);

```

and replace the first three options (driver, model, table) and replace them with the following

```
return array(

    'default' => 'user',
    'multi' => array(
        'admin' => array(
            'driver' => 'eloquent',
            'model'  => Admins::class,
        ),
        'user' => array(
            'driver' => 'eloquent',
            'model'  => Users::class,
            'password' => [
                'email' => 'users.emails.password',
            ]
        )
    ),

    'password' => array(
        'email' => 'emails.password',
        'table' => 'password_reminders',
        'expire' => 60,
    ),
);

```

Usage
-----

[](#usage)

Everything is done by using routes. Just add a key "auth" to the route array with the value you used as a key in your `app/config/auth.php`

```
Route::get('/', array(
    'uses' => function () {
        return 'Hello World';
    },
    'middleware' => [ 'auth' ],
    'auth' => 'admin',
));

```

Now if you call Auth::check() or any other function, it will use the driver and model set in the config for the key "admin".

**If you don't add a "auth" to the route, the "default" type defined in the `app/config/auth.php` will be used.**

If you want to check a specific auth while in a route using a different auth, you can use `Auth::type($auth_key)` to get the wanted auth manager.

```
Auth::type('admin')->check();

```

To get the current auth\_key used by the route, or the default value, if you haven't set it in the route use.

```
Auth::currentType();

```

If you want to login as a different user, just use `Auth::impersonate($id, $auth_key = null, $remember = false)`. If you don't parse a auth\_key, the key set via route, or the default one will be used.

```
Auth::impersonate(3, 'admin');

```

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

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

Recently: every ~34 days

Total

9

Last Release

3789d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e9a12a5f51cb9d82a90b9da083d66dca3e83303059a554d1b27841d2a9f49aed?d=identicon)[wuif](/maintainers/wuif)

---

Top Contributors

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

---

Tags

laravelmultiauth

### Embed Badge

![Health badge](/badges/wuifdesign-laravel-multiauth/health.svg)

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

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[socialiteproviders/manager

Easily add new or override built-in providers in Laravel Socialite.

42542.0M544](/packages/socialiteproviders-manager)[olssonm/l5-very-basic-auth

Laravel stateless HTTP basic auth without the need for a database

1662.5M1](/packages/olssonm-l5-very-basic-auth)[scaler-tech/laravel-saml2

SAML2 Service Provider integration for Laravel applications, based on OneLogin toolkit

2737.5k](/packages/scaler-tech-laravel-saml2)[painlesscode/breeze-multiauth

Multi authentication system with laravel breeze

477.2k](/packages/painlesscode-breeze-multiauth)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

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