Skip to content
Advertisement

Tag: many-to-many

How make a many-to-many rest API in yii2

I’m trying to get a many-to-may relationship to work, but I can’t get it to work. I have a database with 3 tables: users, favorites & videos. The favorites table contains 2 foreign keys that point to the users table and the videos table. Currently I have the following: User Model: Video Model: VideoController: (ActiveController) Following what they did in:

PHP Symfony Many to Many form

I have a many-to-many relationship between two tables in my database (1 artikel has more than 1 bestelling and vice versa), so I made a link table(bestelregel). But now I want to make a form so that I can add a new order with multiple products, but as I am new to this, I am not sure how to do

Advertisement