Create Multi Auth using Guards in Laravel Application

preview_player
Показать описание
How to create #Laravel multiple authentications for multi-role users? This is one of the most requested topics on this channel. In this tutorial, you will learn step by step to create multi auth system with ease using Laravel guards. We will build a multiple guards authentication allowing users and admins to login separately.

Repository:

Blog Post: Implementing Multi-Authentication with Guards in Laravel

▶ Laravel Themer: Add multi-theme support for Laravel application

▶ Laravel Fortify Tutorial

▶ How to add a custom route file in Laravel?

▶ Laravel Backup Tutorial

▶ Laravel Passport Tutorials

▶ Laravel Sanctum

▶ Laravel Excel Tutorial: Excel exports and imports in Laravel

▶ Laravel Eloquent Relationships

⌚ Timestamps:
00:00 Introduction
01:31 Create Fresh Laravel App
01:59 Install Laravel Themer Package
02:57 Create Frontend theme
05:53 Create Admin theme
07:15 Create Routes from admin theme
08:16 Login Route
10:13 Create `Admin` model & `admins` table
12:10 login route & AuthController for user authentication
14:01 Create `admin` guard
16:30 login admin user
18:31 create admin home route
19:54 logout
21:12 fix redirect issues
22:25 modify `auth` middleware, On visit `/admin/home` redirect to `/admin/login`, if admin user not logged in.
24:11 create `admin` helper function
26:08 modify `guest` middleware, On visit `/admin/login` redirect to `/admin/home` if admin user logged in.
28:21 Review working on `multi guard authentication`

Support my work:

𝐃𝐢𝐠𝐢𝐭𝐚𝐥𝐎𝐜𝐞𝐚𝐧 𝐑𝐞𝐟𝐞𝐫𝐫𝐚𝐥

Also, follow us on:
Рекомендации по теме
Комментарии
Автор

Don't get left behind! Try Spec Coder: Supercharge Your Coding with AI!
*50% off!* Use code *YT-FAMILY* (limited time offer).

QiroLab
Автор

Excelente video, tenia 3 dias con u problema en la autenticasion con varios guardians pero tu me has salvado GRACIAS. saludos desde Colombia

alejandrobautista
Автор

very attentive towards small details. worthy subscription!

nilanjanroy
Автор

This tutorial is very helpful for my project. Thank you.

animekurniawan
Автор

looking forward to seeing the spatie/permission in action on admin section, thank you for this video!!

legend
Автор

Great Harish, you have done a fantastic job. Thank You

piyushtyagi
Автор

Thank you so much to create this awesome tutorial.

vineshgoyal
Автор

Muchas gracias me salvaste el semestre.

noevalencia
Автор

the great tutorial helps me a lot thank you...why you are absent form quite time

Ehsankhan
Автор

Your tutorialsare great, like them so much, need to improve your audio quality tho

owfprem
Автор

Hi 👋.. Great video.. I am curious what terminal it is you're using here?!.. I am loving the interface

danemedussa
Автор

what agreat you are, this vidoe is amazing

mohamedgendy
Автор

Great video... Please could you turn up the volume more, it sounds low.

josechirino
Автор

This is awesome. Please can you make a multi tenant with multi theme tutorial. tenant should be able to change the theme with a button click. Thank you

victoronwe
Автор

Can we add multiple auth from the same Table of users instead of using another Admin table and model? And what about if we want to use the
laravel-permission | Spatie to mange the user permission and roles?

kantsverma
Автор

I have a Hosted Laravel project. If I clear all Cache files 📂, it effect my project ? Or improve the performance of project?

mkmeena
Автор

It's a Great Tutorial. If you have time to make another video for SPA with Vue.js for the best practice for multi guard auth with Laravel then it will be more helpful

Thanks

joneyspark
Автор

Bro I have a request, I hope it's not too much to ask.
I have a problem on Recursive relationship in Laravel, if you can make a video tutorial on this topic I'll be very grateful.
Assume I have stored all users in users table and roles in roles table. But in users table there are users with roles of supervisors but they supervise other user from the same table, users table, which means it's a recursive relationship.
Can you show how to create the User model correctly and how to list supervisors and the users they are supervising?
Thanks for your great work as well.

MG-wxyx
Автор

in 17:15, how can I fix error of undefined attempt() method

MrSurge
Автор

how to login with email or phone number for users in multi auth please

mohamedrhaima