Laravel 11 Multi Guard Authentication Tutorial | Multiple authentication for User & Admin in Laravel
ฝัง
- เผยแพร่เมื่อ 7 พ.ย. 2024
- In this video, I have taught how to create a multi guard authentication in laravel 11 step by step tutorial in detail. Where we are creating Admin Guard for Authentication.
Post - Source Code: www.fundaofweb...
Follow us on Instagram: / funda_of_web_it
Subscribe to my Hindi/Urdu Channel: / fundaofwebithindi
Is that the best way for check role or make user in one table and add attribute for checking roles by middle ware ?
th-cam.com/video/ogfHOB18KHs/w-d-xo.html
Great video! Explained very clearly step by step. Thank you.
This is insane. I don't know how is this still a trending in development world!! 😢 Every development tutorial maker is making two authentication pages (register page for custom user and other page for Admin and login pages the same!) So, what they mean is that if i have 7 user's it mean i have to prepare 7 registration pages for each user. Instead of using only one route for login and registration.
Thank you sir . how can apply Authentication and Redirect if authenticated Middlewares ?
th-cam.com/video/ogfHOB18KHs/w-d-xo.html
Hi. How can I add the import button when I right click?
Please install the extension: PHP Namespace Resolver
Sir , first of all huge thanks to u , for this effort...multi role in next video means , are u referring spatie video ? @fundofwebit
th-cam.com/video/ogfHOB18KHs/w-d-xo.html
can you do 3 users, 3rd one is owner?
Hey, but anyone can be an admin, if someon try like website/admin
would this work without laravel breeze?
th-cam.com/video/ogfHOB18KHs/w-d-xo.html
Great job
useful video
why i dont have auth folder on my app folder?
Please run the below 2 commands:
1. composer require laravel/breeze --dev
2. php artisan breeze:install blade
That's it. You will find all the auth files.
Thank you bro.
Sir can you share this code please?
th-cam.com/video/ogfHOB18KHs/w-d-xo.html
Why i dont have auth.php?
@skyand_fly Please run the below 2 commands:
1. composer require laravel/breeze --dev
2. php artisan breeze:install blade
That's it. You will find the auth.php file under routes folder.
@@fundaofwebit thank you! I found you video about breeze logining. You have good content. Don't stay. Hello from Russia
@@fundaofwebit I do not understand how to do it if the user goes to the admin panel so that he is redirected to the login page for the administrator (admin/login) and not the general login page (/login)
@@skyand_fly
If you access (/admin/dashboard), and wanted to redirect to (/admin/login) page. follow below steps:
1. Go to bootstrap/app.php
2. in the ->withMiddleware() function. add these code :
$middleware->redirectGuestsTo(function (Request $request) {
if ($request->is('admin/*')) {
return route('admin.login');
}
return route('login');
});
3. That's it.
@@fundaofwebit thank you, but this doesnt work((