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

Abandoned → [wuifdesign/laravel-multiauth](/?search=wuifdesign%2Flaravel-multiauth)ArchivedLibrary[Authentication &amp; Authorization](/categories/authentication)

wuifdesign/multiauth
====================

MultiAuth integration for Laravel

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

Since Aug 16Pushed 10y ago1 watchersCompare

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

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

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

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

3835d 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-multiauth/health.svg)

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

###  Alternatives

[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5752.3M18](/packages/directorytree-ldaprecord-laravel)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6804.7k6](/packages/hasinhayder-tyro)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1563.1k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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