Laravel Many to Many Relationship | Eloquent Many to Many | Laravel 9 Tutorial for Beginners
Жүктеу.....
Пікірлер: 32
@tacanda6479 Жыл бұрын
This tutorial is even more straight forward than the one on Laracast 👍
@codewithdary
Жыл бұрын
Thank you so much Tacanda
@syaoranpt4 ай бұрын
The video explains it very well, but I was kinda hoping you would explain how to use many-to-many relation together with seeders, that's the more complicated stuff, at least for me. :) Great explanations as usual! Love your videos.
@codewithdary
4 ай бұрын
The video title and description does not say anything about that 😅. Anyways thank you for watching and your kind words :)
@dereksolutionsrobins71177 ай бұрын
good! october cms documentation is crap, this worked like a charm
@codewithdary
7 ай бұрын
Awesome :)
@fernandezjasper7 ай бұрын
Great Video!, now how about 3 foreign keys to the pivot table?
@codewithdary
7 ай бұрын
In what scenario? A pivot table in Laravel can have multiple foreign keys depending on the relationship it represents. It is possible to have a pivot table with 3 foreign keys if the relationship requires it.
@VadimBesedin Жыл бұрын
Thank you for the clear explanation. Great style of teaching. How do you edit data in SQL tables inside of VS Code, is it some kind of extension?
@codewithdary
Жыл бұрын
Hi Vadim. Thank you so much :) I'm using an extension named Database Client, you can find it right here: kzread.info/dash/bejne/Zph9xpatoKi_eaw.html
@VadimBesedin
Жыл бұрын
@@codewithdary Thank you! Keep it up with your great videos! You helping a lot of people.
@kipkoechhillary3371 Жыл бұрын
the best tutoral dary!!
@codewithdary
Жыл бұрын
Thank you Kipkoech!
@lunaer-655510 ай бұрын
really helpful, thank you :D
@codewithdary
10 ай бұрын
Glad it helped!
@sedatozcelik3789 Жыл бұрын
Hi there can you suggest vscode packet for better experience when you write code. Especially; the one about migration file belongsToMany complition at 7.34 is lovely.
@codewithdary
Жыл бұрын
It's better to watch the third video from this video series where I setup Visual Studio Code: kzread.info/dash/bejne/fXWJ2smOpqabYZc.html
@olcayergul Жыл бұрын
what is the advantages of pivot table in a such case post - caregories? I mean we could create a field like category_id in posts table and we could add a foreign key which references id in the categories table. That what i do usually in my projects. Could you explain why do we need pivot table for category and posts? What are the advantages and disadvantages your way and my way?
@codewithdary
Жыл бұрын
If you add the category_id inside the posts table you can't have a many to many relationship. That means you have to duplicate an entire post just to change the category_id inside the posts table. I think you are confused with another relationship!
@olcayergul
Жыл бұрын
@@codewithdary oh you are right. My scenario was about one post can belong to only one category. In your scenario, the user can assign multiple category to a post. Got it.
@stewarty114
Жыл бұрын
@@olcayergul but if you have post_id in your category table you can have a one to many relationship. This is simpler but the problem is you end up with repeating category names - bad for storage and performance when it comes to GB category tables
@lowelltebrero931 Жыл бұрын
how about the attach, sync dettach ?
@randomvariable8680 Жыл бұрын
man could you please tell which vs code theme this is? looks slick
@codewithdary
Жыл бұрын
I think it is Material Theme Palenight. Here's the video where I set it up: kzread.info/dash/bejne/fXWJ2smOpqabYZc.html&t
@ramym.moustafa2507 Жыл бұрын
Please Can I Ask you about your VSCode Extensions and theme you use?
@codewithdary
Жыл бұрын
You can find everything right here: kzread.info/dash/bejne/fXWJ2smOpqabYZc.html&t
@jack-sx9bw Жыл бұрын
which extension of database u are using thx
@codewithdary
Жыл бұрын
Its called Database Clients :)
@tacanda6479 Жыл бұрын
We need a tutorial where we can upload video files instead of picture files.
Пікірлер: 32
This tutorial is even more straight forward than the one on Laracast 👍
@codewithdary
Жыл бұрын
Thank you so much Tacanda
The video explains it very well, but I was kinda hoping you would explain how to use many-to-many relation together with seeders, that's the more complicated stuff, at least for me. :) Great explanations as usual! Love your videos.
@codewithdary
4 ай бұрын
The video title and description does not say anything about that 😅. Anyways thank you for watching and your kind words :)
good! october cms documentation is crap, this worked like a charm
@codewithdary
7 ай бұрын
Awesome :)
Great Video!, now how about 3 foreign keys to the pivot table?
@codewithdary
7 ай бұрын
In what scenario? A pivot table in Laravel can have multiple foreign keys depending on the relationship it represents. It is possible to have a pivot table with 3 foreign keys if the relationship requires it.
Thank you for the clear explanation. Great style of teaching. How do you edit data in SQL tables inside of VS Code, is it some kind of extension?
@codewithdary
Жыл бұрын
Hi Vadim. Thank you so much :) I'm using an extension named Database Client, you can find it right here: kzread.info/dash/bejne/Zph9xpatoKi_eaw.html
@VadimBesedin
Жыл бұрын
@@codewithdary Thank you! Keep it up with your great videos! You helping a lot of people.
the best tutoral dary!!
@codewithdary
Жыл бұрын
Thank you Kipkoech!
really helpful, thank you :D
@codewithdary
10 ай бұрын
Glad it helped!
Hi there can you suggest vscode packet for better experience when you write code. Especially; the one about migration file belongsToMany complition at 7.34 is lovely.
@codewithdary
Жыл бұрын
It's better to watch the third video from this video series where I setup Visual Studio Code: kzread.info/dash/bejne/fXWJ2smOpqabYZc.html
what is the advantages of pivot table in a such case post - caregories? I mean we could create a field like category_id in posts table and we could add a foreign key which references id in the categories table. That what i do usually in my projects. Could you explain why do we need pivot table for category and posts? What are the advantages and disadvantages your way and my way?
@codewithdary
Жыл бұрын
If you add the category_id inside the posts table you can't have a many to many relationship. That means you have to duplicate an entire post just to change the category_id inside the posts table. I think you are confused with another relationship!
@olcayergul
Жыл бұрын
@@codewithdary oh you are right. My scenario was about one post can belong to only one category. In your scenario, the user can assign multiple category to a post. Got it.
@stewarty114
Жыл бұрын
@@olcayergul but if you have post_id in your category table you can have a one to many relationship. This is simpler but the problem is you end up with repeating category names - bad for storage and performance when it comes to GB category tables
how about the attach, sync dettach ?
man could you please tell which vs code theme this is? looks slick
@codewithdary
Жыл бұрын
I think it is Material Theme Palenight. Here's the video where I set it up: kzread.info/dash/bejne/fXWJ2smOpqabYZc.html&t
Please Can I Ask you about your VSCode Extensions and theme you use?
@codewithdary
Жыл бұрын
You can find everything right here: kzread.info/dash/bejne/fXWJ2smOpqabYZc.html&t
which extension of database u are using thx
@codewithdary
Жыл бұрын
Its called Database Clients :)
We need a tutorial where we can upload video files instead of picture files.
@codewithdary
Жыл бұрын
spatie.be/courses/discovering-laravel-media-library