I'm completely new to Laravel and have the following situation:
I have the following Models:
Treatments can have many Products. Each associated Product to a Treatment can have a unique Prescription.
The tables are:
I manage to create the correct relations from products to each treatment. What I cannot figure out is how to relate the prescription to the product in the corresponding treatment. A product can belong to many treatments. If I use a normal pivot table for products_prescription, then this relation applies to all treatments. This should not be the case.
Thanks a lot for any hint or help. Aldo