one-to-many ?
--- customers TABLE ---
id
--- coupons TABLE ---
id | code (unique) | customer_id | used_at (nullable)
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I know this is out of topic with laravel but I still want to try to ask.
So I'm trying to follow this tutorial but what I want to do is a bit different.
I want to have a unique link per coupon generator and the coupon is per customer and can only be used once (e.g. example.com/coupon/7AD8679adO).
Now I want to have a form for this page and just have a input boxes for users like first_name, last_name, and email. And the email field is the identifier that the current url coupon will be registered to that email.
I also tried to research and I found out that there's URL Coupons feature from Woocommerce (Not sure though if this is exactly what Im looking for), but suddenly, it is not free. So, any idea with this?
it's not too complicated... basically you just need a table to keep track the user id and the generated code...
Please or to participate in this conversation.