I am using YII2 for a project
I have created three tables:
[*]Vendor - table to store information about vendors
[*]Cuisines - table to store cuisines each vendor serves
[*]VendorCusines - this is the pivot table that stores how many cuisines each vendor will serve.
Using Gii , i created i generated CRUD and Forms for Vendor and Cuisines.
Now i am trying to modify the Create Vendor Form to display all available cuisines from the "Cuisines" Table as Multiple Checkboxes, so that i can check the cuisines for a new vendor i create using this form and can apply the changes to the database.
I cannot find out how to establish this relation with the "VendorCuisines" pivot table to display the list of cuisines in my Vendor Form.
Can anyone give me the right pointer to move ahead in my project?
I have attached screenshot of my current vendor form and the relational model of my tables.