PHPackages                             kmaking/multi-auth - 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. kmaking/multi-auth

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

kmaking/multi-auth
==================

Multi Auth for Laravel 6 based on Hesto/multi-auth package

v1.0.0(7y ago)41.2k2MITPHPPHP &gt;=5.5.0

Since Aug 21Pushed 6y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

KMAKing MultiAuth for Laravel 6.\*
==================================

[](#kmaking-multiauth-for-laravel-6)

- `php artisan multi-auth:install {guard} -f`
- `php artisan multi-auth:install {guard} -f --domain`
- `php artisan multi-auth:install {guard} {service} -f --lucid`

What it does?
-------------

[](#what-it-does)

With one simple command you can setup multi auth for your Laravel 6 project. The package installs:

- Model
- Migration
- Controllers
- Notification
- Routes
    - routes/web.php
        - {guard}/login
        - {guard}/register
        - {guard}/logout
        - password reset routes
    - routes/{guard}.php
        - {guard}/home
- Middleware
- Views
- Guard
- Provider
- Password Broker
- Settings

Usage
-----

[](#usage)

### Step 1: Install Through Composer

[](#step-1-install-through-composer)

```
composer require kmaking/multi-auth --dev
```

### Step 2: Install Multi-Auth files in your project

[](#step-2-install-multi-auth-files-in-your-project)

```
php artisan multi-auth:install {singular_lowercase_name_of_guard} -f

// Examples
php artisan multi-auth:install admin -f
php artisan multi-auth:install employee -f
php artisan multi-auth:install customer -f

```

Notice: If you don't provide `-f` flag, it will not work. It is a protection against accidental activation.

Alternative:

If you want to install Multi-Auth files in a subdomain you must pass the option `--domain`.

```
php artisan multi-auth:install admin -f --domain
php artisan multi-auth:install employee -f --domain
php artisan multi-auth:install customer -f --domain

```

To be able to use this feature properly, you should add a key to your .env file:

```
APP_DOMAIN=yourdomain.com

```

This will allow us to use it in the routes file, prefixing it with the domain feature from Laravel routing system.

Using it like so: `['domain' => '{guard}.' . env('APP_DOMAIN')]`.

### Step 3: Migrate new model table

[](#step-3-migrate-new-model-table)

```
php artisan migrate

```

### Step 4: Try it

[](#step-4-try-it)

Go to: `http://url_to_your_project/guard/login`Example: `http://project/admin/login`

Options
-------

[](#options)

If you don't want model and migration use `--model` flag.

```
php artisan multi-auth:install admin -f --model

```

If you don't want views use `--views` flag.

```
php artisan multi-auth:install admin -f --views

```

If you don't want routes in your `routes/web.php` file, use `--routes` flag.

```
php artisan multi-auth:install admin -f --routes

```

Note
----

[](#note)

If you want to adapt the redirect path once your `guard` is logged out, add and override the following method in your {guard}Auth\\LoginController:

```
/**
 * Get the path that we should redirect once logged out.
 * Adaptable to user needs.
 *
 * @return string
 */
public function logoutToPath() {
    return '/';
}
```

Files which are changed and added by this package
-------------------------------------------------

[](#files-which-are-changed-and-added-by-this-package)

- config/auth.php

    - add guards, providers, passwords
- app/Http/Providers/RouteServiceProvider.php

    - register routes
- app/Http/Kernel.php

    - register middleware
- app/Http/Middleware/

    - middleware for each guard
- app/Http/Controllers/{Guard}Auth/

    - new controllers
- app/{Guard}.php

    - new Model
- app/Notifications/{Guard}ResetPassword.php

    - reset password notification
- database/migrations/

    - migration for new model
- routes/web.php

    - register routes
- routes/{guard}.php

    - routes file for given guard
- resources/views/{guard}/

    - views for given guard

Change Log
----------

[](#change-log)

### Note: Never install configurations with same guard again after installed new version of package. So if you already installed your `admin` guard, don't install it again after you update package to latest version.

[](#note-never-install-configurations-with-same-guard-again-after-installed-new-version-of-package-so-if-you-already-installed-your-admin-guard-dont-install-it-again-after-you-update-package-to-latest-version)

### Laravel 6.0 Support Added

[](#laravel-60-support-added)

Note
----

[](#note-1)

#### This package was originally from `Hesto/multi-auth`, we improved only routes, controller and view files.

[](#this-package-was-originally-from-hestomulti-auth-we-improved-only-routes-controller-and-view-files)

###  Health Score

30

—

LowBetter than 65% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.2% 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

Unknown

Total

1

Last Release

2818d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/51c326b39fda94682eab10ee28db52f898260cd4e03689eadbcc9c80c69d89c3?d=identicon)[kmaking](/maintainers/kmaking)

---

Top Contributors

[![kmaking](https://avatars.githubusercontent.com/u/15278949?v=4)](https://github.com/kmaking "kmaking (9 commits)")[![dev4indglobal](https://avatars.githubusercontent.com/u/18256432?v=4)](https://github.com/dev4indglobal "dev4indglobal (4 commits)")

---

Tags

laravelauthmulti

### Embed Badge

![Health badge](/badges/kmaking-multi-auth/health.svg)

```
[![Health](https://phpackages.com/badges/kmaking-multi-auth/health.svg)](https://phpackages.com/packages/kmaking-multi-auth)
```

###  Alternatives

[hesto/multi-auth

Multi Auth for Laravel

451467.6k](/packages/hesto-multi-auth)[ollieread/multiauth

Alternative auth system for Laravel

443135.6k1](/packages/ollieread-multiauth)[bmatovu/multi-auth

Laravel Multi Authentication

18325.1k](/packages/bmatovu-multi-auth)[sarav/laravel-multiauth

A Simple Laravel Package for handling multiple authentication

5030.7k](/packages/sarav-laravel-multiauth)[orchestra/auth

Auth Component for Orchestra Platform

24108.5k3](/packages/orchestra-auth)[ingria/laravel-x509-auth

Laravel 5 Client Certificate auth middleware

375.6k](/packages/ingria-laravel-x509-auth)

PHPackages © 2026

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