andriajah Sat Sep 2021 1 year ago

Laravel 8 Multi Guards Authentication

If you have used Laravel for a while, you should have heard a lot about multiple authentications. You should have also heard “guards” a whole lot. But if you are fairly new to Laravel, multiple authentications makes it possible for you to have different classes of users access different/similar parts of the same application.
Keep normal users in user table , admins create another table as admin and doctors create another table as doctor.
In this tutorial we'll use guard to create this multi authentication system.

Source Code:

Related videos:
- Laravel 8 Multi Auth based on Roles

- CodeIgniter 4 Authentication | Login, Register & Filters | Codeigniter 4 tutorial [HD]

---- Chaps -----
0:00 - Intro
0:45 - Creating database
1:58 - Installing Laravel Auth Ui
4:18 - Create Users Table
4:45 - Inserting new user and check user
5:53 - Create UserController for normal users
6:35 - Create user route group for normal users
9:22 - Design users login page
10:26 - Design users register page
11:05 - Normal User auth functionality
30:27 - Admin auth functionality
48:33 - Doctor auth functionality
1:11:50 - Overview
irebe library multi guards laravel 8 multi guards multi guards authentication authentication auth