Laravel Admin And User Login | Laravel 8 Multi Auth System |Different Login For User and Admin HINDI
Vložit
- čas přidán 6. 09. 2024
- In this video, I have discussed the Laravel Auth system. Laravel Admin And User Login | Laravel 8 Multi Auth System |Different Login For User and Admin
User login with laravel breeze auth package and same files used in Admin auth also. Admin and user have different login pages.
Github link :
github.com/aja...
Our Playlist:
Computer Facts: • Computer facts
Laravel Auth System :
• Laravel Multi Auth System
Please subscribe to my channel and share the videos with your friends.
Part #2 :(roles and permissions)
czcams.com/video/n-DKBwhbZ-E/video.html
Hi sir ...Plz help ...I sent msg to u on Twitter too
@@priyanjul Please check Tweeter inbox
I followed ur Laravel vdos from last few days and i found it very useful
Thank u very much for all your efforts
Glad to hear that Akash
Awesome. Keep making videos on Laravel.
Thank you, I will
Thank Your very much you Explain admin login very good. your teaching style is very good I really thankfull to you
You're welcome! I'm glad to hear that my explanation of the admin login was helpful to you. Thank you for the kind words, it means a lot to me.! In addition to the video on admin login, we have other useful videos available as well. I highly recommend checking them out to expand your knowledge and skills
Nice video brother kindly make more videos on Laravel
Kindly make video fetch data from five tables from one unique key. On single page
Sure
very helpful thanks bro ..
its amazing video thanks for sharing good video, please make a complete video for admin html from html template 💯😇😇😇😇😇😇
Noted !! Thank you
@@ajay-yadav most welcome
great you are just great excellent video
Hello Ajay, I have seen ur auth video on breeze , it's excellent but while explaining u gonna fast as we didn't get some of the steps to follow or what procedure is there, so it's request to explain it little bit slowly than earlier
Thanks for this video as I want it for my project
Noted, Thank Deepak
hello sir,
while running the command breeze:install it ask if I want blade, vue, react or API type? which one should I use? which one is your in this video?
TypeError
Argument 2 passed to Illuminate\Auth\SessionGuard::__construct() must be an instance of Illuminate\Contracts\Auth\UserProvider, null given, called in C:\xampp8.1\htdocs\admin_user_auth_system\vendor\laravel\framework\src\Illuminate\Auth\AuthManager.php on line 128
i am getting this error
this tutorials not for freshers.
Good explanation 👍👍
At same browser both admin and user are not able to login at same time
Plzzzzz sirrrrr make a video on this topic "laravel 11 push notification firebase "
Thank you sir today clear my this bages
So nice of you
Hello sir, at 12:27 I got error Target class [Admin\Auth\AuthenticatedSessionController] does not exist.
i have the same problem
if you get the sollution, do tell
Sir please make video on how to connect and use more than one database in Laravel ..By The Way Thankyou For this Video 👍
Yes, sure
That's a majedaar video..🔥🥰
yr ap system ka ek overview video playlist me sub s uper laga dain please , taky pata chale k system kam kase krta ha , like jase demo video hoti ha na project ki.
Great Video!!!!!!!.....One generic question...I think it will be helpful for all...How can I make API from it using Sanctum?
I've uploaded a video for the same, plz check and let me know if you have any question
@@ajay-yadav Thanks a lot for replying. I found this video czcams.com/video/ZWUCQMoKW4g/video.html
I am getting error Target class [Admin\Auth\AuthenticatedSessionController] does not exist. what to do with this plz help
have you got the solution??
Great Sir
Cant, we use the same table to store the User and Admin data what are the benefits of storing admin data in a separate table and what will be in case if there will be multiple Sub admin?
Same me rehne se hacking ka khatra badh jata hai
could you plz explain what is the use of the namespace function in the route file, bcz you mentioned there "Route::namespace('Auth')", so what is the use of it?
Route::namespace('Auth') : here "Auth" is a folder name,
App\Http\Controllers\Auth - this is the auth folder
use of it: you can group the routes on the basis of the folders, so you don't need to mention the 'Auth' folder name again and again.
Sir, please make a complete tutorial for beginners from scratch
yes , sure
Here admin and user dashboard both are show, it is not good, either admin or user one of them login. How create.
already answered this question ... go through few comments reply
Thank youuuuuuuuuuuuuuu so much for this video
Most welcome 😊
NIce work sir Thanks U .
what to do if cmd is not permited to npm install? its throw error.
for me it keeps on coming Target Class [Admin\Auth\AutheticatedSessionController] Does Not Exists
check namespace
change route
example :
Route::get('login', 'AuthenticatedSessionController@create')->name('login');
to
Route::get('login', [AuthenticatedSessionController::class, 'create'])->name('login');
@@muhammaddikidarmawan5919 thnxs
Amazing tutorial can you please tell me if you logout from admin then the user session is also logged out or not? i guess if you logout from admin the user session would remain the same and should not logged out automatically.
you have two users logged in using the same browser? but Why would you allow a user to login twice in the same browser? if you don't care about security then just comment these two lines $request->session()->invalidate(); and $request->session()->regenerateToken(); in both logout functions (user and admin) ... but i'll suggest you not to do this.
@@ajay-yadav I agree you completely and i just was trying to figure out if i have 6 users in my application so i can able to manage the session in browser tabs of the same browser and so if 6 users are logged in the same browser with their respective roles and if one users logged out then the remaining 5 users are still logged in or not. But i guess considering the security in mind it is not a good way.
sir facing error, Trying to get property 'name' of non-object (View: E:\wamp\www\toolkit
esources\views\admin\layouts
avigation.blade.php)
I have followed step by step but it shows an error.
i have already created layouts folder under the admin folder.
if i mention {{ Auth::guard('admin')->user()->name ?? null }} it is working but without ??null not working.
if i have logout and then login admin panel link error create- The GET method is not supported for this route. Supported methods: POST.
i have missed small code. Fantastic video for Biggner
Please make a video using laravel ui
When I run npm install it throw some errors as well as during running npm run dev
Very frustrating kindly give some help to solve it
I guess versioning may be an issue
Hi Ajay, You have nice work. I have already configure templates and layouts. But after installation of breeze my set up is not working. Could please guide me?
Go with custom auth
@@ajay-yadav how does that work?
dear Ajay : kindly help when I use this it removes my old previous routes.
Sab Se last Ma Jo ap Ne user Add Kiya
WO kaise admin Ka dashboard Check Karta Hay
Ye to protected Nahe Howa Per
User ka apna dashboard Hona CHaheya Awr Admin Ka apn AP ne kaha To
use be alag hona chaheay
User ke dashboard.blade.php file me galti se "Admin dashboard " likh gya tha..... Jiski wajah se aap ko lga की dono ek dusre ke dashboard access kr pa rhe है....video ka end part aap fir se dekho tabhi clear ho payega... Admin and User Login hai alg alg guards se... Tabhi ek hi time par dono apne apne dashboard ko access kar pa rhe hn
@@ajay-yadav Ok I Will Check Thanksss
How can I do it without any packege?
But sir user ki profile folder ????
Thanks 😊
Welcome 😊
i m not getting one thing that, if i logged out from user dashboard then it also logged out from admin dashboard, why
Deepak I've already answered this question, just copy-paste KR RHA hun
Do you have two users logged in using the same browser? but Why would you allow a user to login twice in the same browser? if you don't care about security then just comment these two lines $request->session()->invalidate(); and $request->session()->regenerateToken(); in both log out functions (user and admin) ... but I'll suggest you not to do this.
Hi, why you login both user at same time. Make it seperate. when admin is logged in, they can't access user home page and same with user.
Thanks for tutorial, it's very helpfull.
Hi arun... Admin cannot access the user's dashboard and same for the user....
Because both user is using different guards... They have separate login page, separate table, separate auth guard and separate dashboard...
@@ajay-yadav Can we have to keep user data in the same table with a separate guard?
@@DevenderKumar-kg4hy yes you can use guard but for single table I'll suggest you to use Middleware
make complete video upon middleware who will access and who not with clarity and this should be in usertype like admin=1 & default 0 for user format and
admin login and user login same page after login redirect to respected dashboard and after logout redirect to login all these customize only dont use any pakages. pleaze make if you,
Thank you
please check other videos in the same playlist...
Helpful.
Glad it was helpful!
1 issue if in case i login as admin and user both and i logout admin and user is automatic logout and this is vice versa user logout then admin is automatic logout
already answered in detail please go through the comments
Amazing Sir jeee
sir form style not working please help me
in admin panel it showing the credentials did not match
Check database/seeder class
I guess
Email : admin@admin.com
Password : password
please make a video on role and permission in admin login with admin is not delete able
@Akash , already have published a video on role and permissions. check the playlist
@@ajay-yadav okay I will check this and I have question, how will I make a admin is not delete able ?
@@AkashSingh-xf6bd ummm, you can check the role of the user while deleting the record
like ,
if(!$user->hasRole('admin')){
$user->delete();
return 'success';
}
return 'admin can not be deleted'
@@ajay-yadav thanks for helping me I will try this and info you it is working or not
1 issue i login as user and admin then i click browser back arrow redirect to login page
ok thanks for raising this issue ... to prevent this add "guest" middleware on the login and register route
not wNice tutorialle quarantine but how r u doing is that hard ?
Sir Please real world application banaye laravel me..
Sure
Vijay.... Jaldi hi ek project suru krenge
laravel 10 se related videos upload kariye, sir
As soon as possible
Good Experience
Hello sir, I have a question.
When we are logged in as both Admin and user both at the same time as shown in the video. Then we click on logout from admin panel, it also logs me out from user panel also and vice versa. But we have different guards , don't we have different logouts also as different logins. Can you please clear my doubt.. ??
Did you solved this problem brother?
Hi, for the error "Target class [Admin\Auth\AuthenticatedSessionController] does not exist."
you need to add this line "->namespace($this->namespace) "
next to "Route::middleware('web')"
in RouteServiceProvider.php file.
Thank u sooooo much
its already there.. still showing the same error
If you are using laravel 9 version,, change route into this one below
//Admin routing
Route::namespace ('Admin')->prefix('admin')->name('admin.')->group(function () {
Route::namespace ('Auth')->group(function () {
//login route
Route::get('login', [App\Http\Controllers\Admin\Auth\AuthenticatedSessionController::class, 'create'])->name('login');
});
});
@@kodemnky thanks bro
@netoutube it's not resolving for me
helpfull
Hello Ajay, I'm faceing this issue will you please help me with this?
on dashboard its not prpperly arranged css and js not working
@vite(['resources/css/app.css', 'resources/js/app.js'])
Any error?
Target class [Admin\Auth\AuthenticatedSessionController] does not exist.
Check namespace in the same file
change route
example :
Route::get('login', 'AuthenticatedSessionController@create')->name('login');
to
Route::get('login', [AuthenticatedSessionController::class, 'create'])->name('login');
jo default thae
it is same in UI package ???
Trying to get property 'name' of non-object
Use guard name
thanks
Call undefined method problem 😢
Awesome bor.
Hello SIr. I get this error (Unable to locate a class or view for component [admin-layout].)
Could you tell me why please?
@Azar Maghsoodi Verify this file (/app/View/Components/AdminLayout.php) exists or not
@@ajay-yadav thank you very much, that was a problem
HI Ajay, what changes will be required in this setup if we user breeze vue ?
Not much
hey sir, how i can edit design login and logout ?
go to resources/views folder and you'll get login.blade.php and register.blade.php.
Hi ajay, Can I use custom login and registration page with breeze ??? If no then do u have any video for custom multi authentication ?
Yes, you can, you can use middleware or custom guard along with breeze for multi auth...
yes I do have a video
czcams.com/video/yXjHYTFRTC8/video.html
Hello sir. Please add link for sourse code
the mager problem is a how to install npm... sir??
Mohit Just run npm install
@@ajay-yadav no sir i do but not work so pplz tell me the solution sir
@@mohitsharma4852 any error ?
if admin hit admin. login name route redirects admin. dashboard sir am I right or not?
yes... if admin is loggedin
when I write ' php artisan make:controller Admin\Controller ' it doesn’t work for me. Is there an other way for fixing this error ?
it depends on the Operating system. For Windows : PHP artisan make:controller Admin\TestController
for linux : php artisan make:controller Admin/TestController
difference : windows (\) , for linux (/)
@@ajay-yadav I use a macbook, I think it's the same then as linux?
Yes
for Mac its different it didn't work with me either but when I tried / instead of \ it worked !!
teaching method is too fast to understand what are you doing and you are going with rocket speed that ignoring plane speed . Those who are rocket developer already know the login method , So please at least make it easy to understand for beginner.
Thanks
Yes, you are right, will improve
Sir please ek video me bataye ki ye functionality kese work karti hai detail me please sir
@Vijay functionality matlb Admin ki or breeze auth package ki?
@@ajay-yadav sir matlab ek overview dijiye is video me ki how it's work?
@@vijaykoladara8302 oh ok got your point will try.
Good morning sir, Thank you so much for this video, I have a small request from my side. Can you make a video for displaying the data in the user dashboard?. I don't know where to place the controller for the user and it is showing 'Undefined variable $projects' if I am calling the data. Please help me sir.
Hi akhil sorry for late reply. Create separate controllers for user and admin it would be easy to manage
Bro I have been trying thus video for the past 1 week but donot work...many errors ...😔
Oh bishnu.. Sorry bro... Can you please share the error message
@@ajay-yadav Sir First of all thak you soo much for this video , I am Very glad that you replied And I am from Nepal lots students from IT background and watch and love your videos .. for the past 1 year,, But in this video I am not able to make authentiocation for admin. the errors is like this ,, Attempt to read property "name" on null But when I delete it from admin {{ Auth::guard('admin')->user()->name }} in views/admin/layouts/navigation and than but when i delete it name and email donot comes... Sir can you please solve this issue or can you please make other video in this ,, Great Love and Respect from Nepal.🥰
@@ajay-yadav sir I am on laptop and waiting for your reply🥺
See, it's hard to guess the issue without looking at code... But you can do one thing.... Just download the repository from Github and... Check if you have missed something...
@@devilprogrammer5349 add dd() in the controller before loading the views
Hello, I got error Auth guard [admin] is not defined.
mohan ... check config/auth.php
@@ajay-yadav please tell me how to solve it.
@@ajay-yadav i also got same error
Nice
Main ek table main register key sabhi table main insert ki hai. Ab USS key se five table se data ek page par view karna chata hoon relationship se nahi hua. Kindly help
Can you please give me table name with table fields name
@@ajay-yadav brother make any five tables
1. From three table fetch any text. From single colomn
2. fetch two images from two different tables
3. Fetch on single page
4. Kindly fetch in single query with one unique key
kindly tell me without joins also only with unique key
plz make a video on multi auth api
noted !! thank you
bhai aap itni jaldi new updates ki changes kesy samaj lata ho mujy tu har bar video dakhni parti hai youtube sa jb koi changes hoti hai framework main documentation sa tu pata he nahi chalta detail main please btaya ga zror kia tareeka hai coding ko acha sa understand krna ka
experience ke sath trika bhi aa jayega tnsn na lo
Auth guard [admin] is not defined.
tried many time but same issue.. anywhere have to define sirji
Check config/auth.php
Amazing
Thank you! Cheers!
22:36
any isssue ?
@@ajay-yadav
No, it just saves seconds of video in the process of working. Thanks for the great video very helpful.
sir where is link of github ..i could not find it in discription
@laiba tanveer ... i'm so so sorry , i just forgot to give the link ... now please check again. now i've given the link in the description.
@@ajay-yadav yess got it ..thank You soo much🌺
kya email verfication ka option bana skate hai , varna fake email se login ho sakte hai?
email verification ke liye aap user ke email address pr 4 ya 6 digit ka number bhej k use verify karwa skte ho... Esse fake email address se bcha ja skta h
Sir facing error 23:06
Attempt to read property "name" on null
Getting Admin data with guard in blade file??
@@ajay-yadav Attempt to read property "name" on null (View:AdminUserAuthSystem
esources\views\layouts
avigation.blade.php)
@@ajay-yadav sir i am also having this problem please resolve this
@@hariompal7534 ok .. "resources\views\layouts
avigation.blade.php" this is not the admin navigation file its for user. so watch at 21:48 where we have defined admin navigation in admin/layouts/app.blade.php . After that watch 23:03 where i'm including the admin layout in resources/admin/dashboard.blade.php
Still getting error ??? download the github respository , link in the description.
+REP
Jetstream k liye bhi yehi tariqa ho ga kia?
Custom wala same hoga bt breeze ki jgh Jetstream use kr skte hn
bhai mera npm install nae horaha iska bta do please
Sabse phle npm - - version run kro.... Uske bad aap apne laravel project ke me ja kar.... Npm install run kro... Fir bhi nhi hota h to error send kro tabhi idea lgega
🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰🥰
apna admin ka kia password dalata
Email : admin@admin.com
Password : password
@@ajay-yadav thanks sir
It's to long bro.. Where is source code ?? Plz upload the source code.
Check description
Background music is annoying
Ev thru u
Please answer this question early
Question??
sir mera ya question h kay mny login bna liya user and admin ka but problem ya kay aik barr dono mein login karo tu ho jata pr jb dobara karo tu kehty wrong credentails ka option aajata red mein uper aik baar hee kyun ho raha h login?
@@ajay-yadav r jb admin mein login krti hu tu trying to get property name of non a object view/admin/layouts/navigations
Admin ke navigation.blade.php file me guard name check kro... May be guard name aap bhul rhi hongi.....
Or download the project from Github.... Link description me diya hun.... Uske bad admin/layouts/navigation. Blade. Php file ko match kr k dekho
Dono user ko alag alg browser me login kr ke check kro ek bar..... Sayd wrong credentials ka error n aaye uske bad
sir provide your contact help for new webapp creat my business
hello sir,
while running the command breeze:install it ask if I want blade, vue, react or API type? which one should I use? which one is your in this video?