Laravel Logic with Price Tiers
<p>I wonder if somebody can point me in the right direction.</p>

<p>I've got a e-commerce platform built on Laravel, works a treat! However I now want to introduce price tiers for certain products.</p>

<p>For example, I have one item priced at £10.00.</p>

<p>I want to introduce multiple pricing tiers for this item</p>

<ul>
<li>Order between 1 &amp; 10 = Unit price is £10.00 </li>
<li>Order between 11 &amp; 15 = Unit price is £8.00</li>
<li>Order more than 16+ = Unit price is £6.00</li>
</ul>

<p>I had it in my mind that I would create two additional tables to my product tables called tiers.</p>

<p>1 being Product_tiers containing</p>

<ul>
<li>product_id </li>
<li>tier_id</li>
</ul>

<p>Another table Tiers</p>

<ul>
<li>id</li>
<li>Tier Name</li>
<li>percentage_drop</li>
<li>less_than_quantity</li>
</ul>

<p>My question is in a controller when persisting an order to the platform how I would workout the quantity entered to order is within one of the tiers above?</p>

<p>Can anyone point me in the right direction so I can research? Google didn't help</p>