Download the PHP package kmaking/multi-auth without Composer
On this page you can find all versions of the php package kmaking/multi-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package multi-auth
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?
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
Step 1: Install Through Composer
Step 2: Install Multi-Auth files in your project
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
.
To be able to use this feature properly, you should add a key to your .env file:
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 4: Try it
Go to: http://url_to_your_project/guard/login
Example: http://project/admin/login
Options
If you don't want model and migration use --model
flag.
If you don't want views use --views
flag.
If you don't want routes in your routes/web.php
file, use --routes
flag.
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:
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