No video

Laravel Advanced - Polymorphic Relationship

  Рет қаралды 7,159

Laratips

Laratips

Күн бұрын

Let's be friends:
/ aashish_dhamala
Github Repo:
Please read the readme to access the code for the specific video.
github.com/lar...
Laravel 8 Advanced - Has One Relationship
• Laravel Advanced - Has...
Laravel 8 Advanced - Has Many Relationship
• Laravel Advanced - Has...
In this video, I have discussed the has many polymorphic relationship.
A polymorphic relationship allows the target model to belong to more than one type of model using a single association.
In a one to many polymorphic relationship, the target model can belong to more than one type of model on a single association. For example, imagine users of your application can "comment" on both posts and products. Using polymorphic relationships, you may use a single comments table for both of these scenarios.

Пікірлер: 11
@Laratips
@Laratips 3 жыл бұрын
We have a lot of benefits when using polymorphic relationship. However, we have one disadvantage that we will not be able to use the foreign key here.
@lucadifazio2735
@lucadifazio2735 2 жыл бұрын
That was exactly what I was looking for. So do I need to write the foreign keys manually?
@ashwagjan4532
@ashwagjan4532 2 жыл бұрын
you are an awesome teacher
@bobbyiliev_
@bobbyiliev_ 3 жыл бұрын
Great video! Well done.
@Laratips
@Laratips 3 жыл бұрын
Thanks
@lijahtech8200
@lijahtech8200 3 жыл бұрын
Nice video, thanks.
@mmsskk1413
@mmsskk1413 3 жыл бұрын
Wonderful Video
@Laratips
@Laratips 3 жыл бұрын
Thank you! Cheers!
@dhanushkafernando6316
@dhanushkafernando6316 3 жыл бұрын
Usefull
@renejguerra8089
@renejguerra8089 2 жыл бұрын
What about many to many?
@Laratips
@Laratips 2 жыл бұрын
I have video on all the relationship in laravel. You can check my channel
Laravel Advanced - Has Many Through Relationship
20:03
Laratips
Рет қаралды 7 М.
Laravel Advanced - Has One Relationship
41:04
Laratips
Рет қаралды 4,5 М.
Can This Bubble Save My Life? 😱
00:55
Topper Guild
Рет қаралды 68 МЛН
КТО ЛЮБИТ ГРИБЫ?? #shorts
00:24
Паша Осадчий
Рет қаралды 937 М.
Laravel Code Review: Why NOT Use Repository Pattern?
14:21
Laravel Daily
Рет қаралды 77 М.
Eloquent Polymorphic Relations: Properly Explained
9:56
Laravel Daily
Рет қаралды 40 М.
Laravel Advanced - Has One Through Relationship
13:21
Laratips
Рет қаралды 3,7 М.
Brutally honest advice for new .NET Web Developers
7:19
Ed Andersen
Рет қаралды 145 М.
Laravel Basics - Accessors, Mutators and Casting
20:30
Laratips
Рет қаралды 8 М.
Laravel Eloquent: Deeper Relationships with One Query
10:37
Laravel Daily
Рет қаралды 139 М.
Should You Dare Criticize Kamala Harris... | Piers Morgan
12:40
Jordan B Peterson
Рет қаралды 1,9 МЛН
Why is anti-immigration sentiment on the rise in Canada?
13:00
The Guardian
Рет қаралды 1,8 МЛН