Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

susant's avatar

Entity Relationship to retrieve data

This is the rate table. According to zone and cart weight, I want to give consumers an option to choose different available tier rates and the tier rates will be managed by the admin. With Laravel, I am trying to structure this in RDBMS and I am stuck in managing the relationship of entities.

| Zone 1 | | | | | ------------ | ------------ | ------------ | ------------ | | Shipping weight/KG |Tier 1 | Tier 2 | Tier 3 | | ------------ | ------------ | ------------ | ------------ | |0.5 | $0.00 | $8.00 | $20.00 | | 1 | $0.00 | $11.00 | $30.00 | | 1.5 | $0.00 |$12.00 | $35.00 | | 2 | $0.00 |$13.00 | $40.00 | | 2.5 | $0.00 | $13.00 | $40.00 | | 3 | $0.00 | $14.00 | $45.00 |

| Zone 2 | | | | ------------ | ------------ | ------------ | | Shipping weight/KG |Tier 1 | Tier 2 | |0.5 | $11.00 | $22.00 | | 1 | $14.00 | $27.00 | | 1.5 | $17.00 |$32.00 | | 2 | $20.00 |$37.00 | | 2.5 | $23.00 | $42.00 | | 3 | $26.00 | $47.00 |

0 likes
0 replies

Please or to participate in this conversation.