I am having some problems when generating select fields with data in my bd, the scenario is as follows: I have 5 tables:
- shopping cart: id, name, description, total_price
- Car_beverages: id, beverages_id, shopping_car_id (foreigner)
- products_extra_carro: id, products_extra_id (foreigner), car_compra_id (foreigner)
- Drinks: id, name, price
- products_extra: id, name, price, provider_id (foreigner)
This I add in a form in which I add several select fields using jquery with the data of the two tables beverages and products_extra , and the selected data are stored in the tables beverages_carry and productos_extra_carro respectively, adding me works perfect but when editing I need to generate the select fields that have been previously saved from the tables beverages_carro and products_extra_carro plus the data of my tables beverages and products_extra to be able to change if desired, how could these select generate? I'm starting with Laravel and this is spinning my head .. any ideas? thanks for your answers