#5.1 One to Many & One to One Polymorphic Relationships | Laravel Eloquent Relationships

  Рет қаралды 17,764

QiroLab

QiroLab

4 жыл бұрын

In the #Laravel Eloquent Relationships, we have seen standard one-to-one, one-to-many, many-to-many, and has-many-through relations. Next, in this video, we will see polymorphic relationships. It is not so common, but very powerful when it is needed.
In this video, you will learn,
✔ One To One (Polymorphic)
✔ One To Many (Polymorphic)
𝐋𝐚𝐫𝐚𝐯𝐞𝐥 𝐄𝐥𝐨𝐪𝐮𝐞𝐧𝐭 𝐑𝐞𝐥𝐚𝐭𝐢𝐨𝐧𝐬𝐡𝐢𝐩𝐬 𝐏𝐥𝐚𝐲𝐥𝐢𝐬𝐭
• Laravel Eloquent Relat...
Also, follow us on:
𝐅𝐚𝐜𝐞𝐛𝐨𝐨𝐤: qirolab
𝐓𝐰𝐢𝐭𝐭𝐞𝐫: / qirolab

Пікірлер: 22
@petritmekuli
@petritmekuli 2 жыл бұрын
Great tutorial, thank you.
@Ehsankhan0577
@Ehsankhan0577 2 жыл бұрын
nice tutorial.........thanks
3 жыл бұрын
Thanks
@allahyar8709
@allahyar8709 3 жыл бұрын
fantastic video, thank you
@QiroLab
@QiroLab 3 жыл бұрын
Glad you liked it!
@juliojairfpv6217
@juliojairfpv6217 3 жыл бұрын
Excellent!
@QiroLab
@QiroLab 3 жыл бұрын
Thank you! Cheers!
@younesmaskouf2785
@younesmaskouf2785 Жыл бұрын
thank you for your effort ! verry helpfull
@QiroLab
@QiroLab 6 ай бұрын
Thank you! Cheers!
@Shiffin11
@Shiffin11 3 жыл бұрын
hey, do you have any idea how the reverse structure would work ?? for ex: we have the morphTo model record created first- let's say we have a case where we create App\User model which will have MorphOne relation to App\EmployeeDetail and App\FreelancerDetail so in this case we have our Users registering first and based on their profile is when we add data to the concerned tables of either EmployeeDetail or FreelancerDetail, or it can even be like Admin or User on the User Table.. hope you understood what am trying to convey.. have you ever come across a need for shaping such a structure ??? let me know.. thanks..!!
@AGAGARCIA
@AGAGARCIA 3 жыл бұрын
Great job
@QiroLab
@QiroLab 3 жыл бұрын
Glad you like it!
@may4223
@may4223 2 жыл бұрын
thank
@QiroLab
@QiroLab 2 жыл бұрын
welcome
@saeedahmedsiddiqi3766
@saeedahmedsiddiqi3766 3 жыл бұрын
Cant we add a field in dbtable like "commentType" and save which type of comment inside it? Like for Videocomment - Video & for post - post? or we can set any numeric value as well like 1 for video and 2 for post???
@mahbodahmadi5715
@mahbodahmadi5715 4 жыл бұрын
whats your database manager app?!
@sadanandmasurkar6668
@sadanandmasurkar6668 3 жыл бұрын
hi sir could you please make a tutorial on other concepts on relationship like (join, query on model,multiple eager loading model(and query on specific one))
@QiroLab
@QiroLab 3 жыл бұрын
noted. I will make videos on this as well. Thanks
@redtroreborn9356
@redtroreborn9356 2 жыл бұрын
how to make an update method using morph?
@nahueljj
@nahueljj 3 жыл бұрын
how to update?
@bhaveshgupta1232
@bhaveshgupta1232 Жыл бұрын
sir which database u r using
@QiroLab
@QiroLab Жыл бұрын
MySql
Laravel Advanced - Polymorphic Relationship
44:28
Laratips
Рет қаралды 7 М.
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 23 МЛН
Eloquent Polymorphic Relations: Properly Explained
9:56
Laravel Daily
Рет қаралды 40 М.
Laravel: BelongsTo vs Polymorphic? Let's Test!
14:09
Laravel Daily
Рет қаралды 26 М.
The Modern Dev CMS - Pocketbase
25:25
Syntax
Рет қаралды 10 М.
5 tips for supercharged Laravel Eloquent queries
16:29
Andrew Schmelyun
Рет қаралды 67 М.
Laravel Migrations: 12 Useful Tips in 12 Minutes
12:06
Laravel Daily
Рет қаралды 78 М.
Laravel 7 Tutorial - Eloquent Relationship One to Many
16:24
Surfside Media
Рет қаралды 7 М.
Many to Many Relationship in Laravel (Hindi)
33:46
Geeky Shows
Рет қаралды 16 М.
iPhone 15 Pro в реальной жизни
24:07
HUDAKOV
Рет қаралды 308 М.
После ввода кода - протирайте панель
0:18
Up Your Brains
Рет қаралды 1,2 МЛН
Собери ПК и Получи 10,000₽
1:00
build monsters
Рет қаралды 2,6 МЛН