Laravel Roles and Permissions Without any package in HINDI
Vložit
- čas přidán 28. 09. 2021
- In this video, I have discussed Laravel roles and permissions. we have discussed the core concepts of the role and permission of laravel without using any packages
Our Playlist:
Computer Facts: • Computer facts
Source Code :
github.com/AjayYadavAi/Larave...
#LaravelRolesAndPermission #RoleAndPermissions #Laravel8Roles
Please subscribe to my channel and share the videos with your friends.
Thank you so much sir. I waiting for this video. You are Superb 😊😊😊😂😂.
Superb video bhai pura concept hi clear kar diya ...bas ek blog ki site start karo laravel me multi login ke sath..
Ok pavan bhai will try
great video ajay bhai awesome tutorial love from pakistan thanku for this great video
Thank you so much for Amazing video
Most welcome 😊
Thanks, a lot Sir ye video bhot kamal ka tha.
Thanks for watching Shoaib Bhai
Thank you very much sir 😊 for covering all important concepts in one video...
Keep watching
thanku so much sir main ap key vedio ka hey wait kar rha tha..tysm ab bus VUE JS key series bana dain ap ka ehsan ho ga
जरूर भाई
Excellent
Part #1 : (Admin And User Login)
czcams.com/video/UWniysfpTmM/video.html
isn't Blade directive call new query every time you use it? suppose I'm using it inside a loop.
background music na hota tou or bhi maja aata video ka..
hello sir in this video you did not create role_user table when i did this :
$user = \Auth::user();
dd($user->roles);
code in home function of controller error appeared given below:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'laravel_crudapp.role_user' doesn't exist.Please help me giving this answer
Thanks
Welcome
i am using laravel 9 version when i type npm install it say npm is npm' is not recognized as an internal or external command,
operable program or batch file.
Install node js first
👍
Excellent!
How can we make permission in middleware?
Hi Ajay,
I hope you are doing well
and i have query regarding relationship
for example
i have two tables one user and another one is user_content and both have auto increment ID as primary key and i want to make a hasone relationship between them. i know it is possible foreign key relation
but i my case the scenario is different, the scenario is like that i want to user_content have one column name is "phone number" and this phone number have a "varchar datatype " and i want to relate this phone number with user id
mean : non foreign key -> with primary key (main key point is here both have a different data type on is Varchar and id int )
can you suggest me how is it possible
Akash, you r saying, user_id is not present in the user_content table and only phone number is available in the table to connect with users table.... But how the phone number column is related to the user_id
@@ajay-yadav Yes you are on right way .. please help me
@@AkashSingh-xf6bd but first help me to understand the scenario . How can you identify user's phone number without user_id in second table ???
@@ajay-yadav okay wait
Table one is user with id and name column and Id is primary key and other table is user_contact with id and phone number's column where Id is primary key.
Next is phone number have varchar (255)data type and user_ Id have int data type so if make a phone number as foreign key and make a relationship with user_id it throws error, as you know very well in foreign key relationship the data type should be Same in both column
So I want one to one relationship by help of phone number (Varchar)with user_id (int)
@Akash Singh
As per my understanding ,
Tables:
users:
id,name, phone_number(int) ....
user_contents:
id, phone_number(varchar)
if this is the case then:
do one thing in User.php (model ) add this line
public function usercontent(){
return $this->hasOne(UserContent::class,'phone_number','phone_number');
}
and test it:
$user = \App\Models\User::first();
dd($user->usercontent->toArray());
One more thing.. Make phone number unique of User_content table
Hi can u make video on user activity log for multi guard. Means Admin can see the log activity of user. And superadmin can check the log activity of user as well as different roles of the admin role.
I hope he can make a video about this topic.
How to manage permission from controller when role is dynamic, I want to use same controller for multiple role..
use middleware
How can I do this with single table and single route
What about policies? Great tutorial bro
already
sir mene rola and permission create kiya h but permission nhi h us case m error h
Sir agar ap virtual host bana lein to ap ko har dafa php artisan serve ki command run nahi Karni hogi
right ... but beginners ke liye ye helpful h ....
What is means ... In hasRole (... ) Please tell me sir
why we have taken slug in roles and permission and what are its usage
Just want to separate the name and slug. slug is just like unchangeable names can be changed
hi, grate work.
Laravel 8
i need tutorial video and audio to show and express the code {example 4 user type (super-admin, admin, Data Entry, Data view) and assigning roles and permission also Enable, disables users} but if user register by default (user type "View") and can login based only roles, and permission to allow access pages . How to add Admin LTE 3 template [not starter one](sprite Header, footer, contents and left menu side bar) and make routes, Controller and view based on upper requirement ASAP.
fresh Laravel project
login & Registration
Enable / Disable user
assigning roles and permission
add Admin LTE 3 template
noob
Sir aap un logo ke liye video bna rahe ho jinko laravel aata h harare jese ke liye bhi please series bna dijiye
sure rahul. thank you
Sir laravel advance Api m webhooks pr video bana dijiye please
Sure
sir Vue Js key bhy series bana dain laravel main
ok mohsin .. I'll try to create some crud operation and also later we'll add more features like login and register. aise aap ko practically sikhne me shi bhi rhega.
@@ajay-yadav Thanku So much Bro ☺️❤️
please laravel vue and inertia use jetstream ka use laravel mai btaiye plz
sure. noted , thank you
@@ajay-yadav plz jhaldi bna do na multiple auth jetstream Vue and inertia laravel
Hi,
How can contact with you ?
I've provided all the social media links in the description and also my email address.
Little explanation for the actions would be great , sometimes you are just instructing what to do but not why you are doing so . anyways , thanks . it was not great for me .
Noted , Sorry about that
😢
very hard for me
sir please source code
check description
Reply sir
Can we have WhatsApp group sir, Please ?
Hi sunil,
U can dm me on insta, twitter, linkedin
@@ajay-yadav OK sure
your voice is not clear