Create Multi Auth using Guards in Laravel Fortify

preview_player
Показать описание
Creating multiple guard authentication in #Laravel #Fortify is one of the most requested topics on this channel. In this video, you will learn step by step how to create multi-auth system in #Laravel #Fortify using guards. We will be building a multiple guards authentication that allows users and admins to login separately.

▶ Before continuing I recommend watching the previous tutorial on creating Multi guard authentication without Fortify package:

▶ Repository:

▶ 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
00:53 Create Fresh Laravel App
01:25 Install Laravel Themer Package
02:39 Install Laravel Fortify Package
03:01 Create Frontend theme
05:10 Register & Login feature
07:37 Create Admin theme
08:23 Routes for admin theme
10:08 Create `admin` guard
10:52 Create `Admin` model & `admins` table
12:39 Login feature for admin using Fortify package controllers
14:41 Fortify's `StatefulGuard` class
17:38 create admin home route
18:18 logout feature
19:04 fix redirect issues, on login from `admin/login` page it should redirect to `/admin/home`
22:46 modify `guest` middleware, On visit `/admin/login` redirect to `/admin/home` if admin user logged in.
24:21 modify `auth` middleware, On visit `/admin/home` redirect to `/admin/login`, if admin user not logged in.
25:09 Review working on `multi guard authentication`

Support my work:

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

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

This video is very similar to the previous video on multi guard without Fortify package. If you have watched the previous video jump to a specific section from following Timestamps.

⌚ Timestamps:
00:00 Introduction
00:53 Create Fresh Laravel App
01:25 Install Laravel Themer Package
02:39 Install Laravel Fortify Package
03:01 Create Frontend theme
05:10 Register & Login feature
07:37 Create Admin theme
08:23 Routes for admin theme
10:08 Create `admin` guard
10:52 Create `Admin` model & `admins` table
12:39 Login feature for admin using Fortify package controllers
14:41 Fortify's `StatefulGuard` class
17:38 create admin home route
18:18 logout feature
19:04 fix redirect issues, on login from `admin/login` page it should redirect to `/admin/home`
22:46 modify `guest` middleware, On visit `/admin/login` redirect to `/admin/home` if admin user logged in.
24:21 modify `auth` middleware, On visit `/admin/home` redirect to `/admin/login`, if admin user not logged in.
25:09 Review working on `multi guard authentication`

QiroLab
Автор

I'm a beginner and found your tutorials to be helpful. I'm still learning breeze and fortify. Thank you.

EdwardKoo
Автор

Hello my friend!
I really like all your videos, and I apply many of the things you give us, I love the way you explain where each request comes from.

I would like to inform you that in your theme package, when creating a new theme by choosing Bootstrap, skip, view only it creates the templates with the x-layout-app tag and does not create the files to render.

Thanks again for creating these exceptional videos.

Maurice from Brazil

mauricemasierodeaquino
Автор

Awesome Tutorial, Thanks. I'm Looking for this exact tutorial for 1 week.

Roman-rofj
Автор

using this process... if i try to logout admin then it also logs out the user...

Mimsinu
Автор

can you help make multiple guards with jetstream?

shareknowledge
Автор

Is there anything I should have in mind when implementing multiguard without the frontend, and using it only as an api, using Sanctum or Passport

not.lumi
Автор

Nice content, if logout from admin it’s is redirecting to home, how it fix to redirect to admin. Thank you in advance.

KamalakarPolu
Автор

can we use same page for both admin and normal user if yes then how?

umairsaeed
Автор

can u make a tutorial about multi role base redirect using fortify

leumaix
Автор

is it still valid with laravel 10. and what about registration, email verify and password forget pages.

bulent.sakarya
Автор

yes we would love to learn laravel service container

abbaskhajah
Автор

What should i do for the middleware('theme:admin') if I am not using themer package?

victorlee
Автор

thank you for this video but I have a question how can reset the password and verify the email and registration for multi auth using guards in Laravel Fortify I hope you explain it in a video or video recommended please 🙏

fatimaahmad
Автор

can you gave us tutorial of fresh laravel jetstream or concept about otp using telegram, like two factor auth, but not send it by email, but using laravel bot, thanks.

yuliarahma
Автор

please help me, how to modify path after logout, i want to redirect to admin/login page, T-T :( .

carantv
Автор

Can you please make a video about multi guard auth with laravel sanctum?

eribertmarquez
Автор

Please upload multi auth with jetstream.

aaravsweb
Автор

Whenever I try to login with admin it says post method not supported in this route

tanzimibthesam