In this tutorial we are going to show you how to implement multi authentication system in your laravel app with specific guards.

In this example we will add admin auth.

First you need install this package through Composer.

then if your laravel version is lower than 5.5 you have to add the provider in app/Providers/AppServiceProvider.php like this :

Now let’s add admin auth with artisan command and the package will set up everything  for us.

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

next we have to migrate the Migration of admin model

To try your new authentication just go to: http://project_url/admin/login

For more information about the package check the github link


I hope you like it 😊


Read Also  Send Email with Attachment in Laravel

No Comments

Leave a Reply

your email address will not be published. required fields are marked *