lundi 29 novembre 2021

Laravel complex relationship many to many

I’m building a app in laravel and now I’m doing a payments resource.

The ideia is select many orders in the list to receive in same time. And in this receives can be used many type of payment (money, credit).

Now I has this tables order(id, total), paymentTypes(id, paymentName), payments(id, payment_type_id, value) and order_payments(order_id, payment_id).

This structure is more adequate to this situation? And how can I get orders with all payments and the other orders payed together?

Any help is important.

Thanks everyone .



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire