Store the discount details as json (you're using Mongo so not a biggie).
Create a class, implementing an discount interface, for each type of discount.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi all,
I want to implement a promotion discount system in Laravel.
Campaigns
User may get discount on order, product, cart etc. Conditions like "order_total > 200" or product_name === 'Kitkat' Discounts like %off, flat discount, shipping free, %off on nth quantity, Buy X get X free etc. (In future new discounts also add.)
How do I achitecture it? What are the Laravel concepts I need to use to achieve it? event-listner concept is useful here if we consider the new discounts?
I'm using Laravel5.5 + MongoDB.
Regards, Saneesh.
Please or to participate in this conversation.