fix: 🐛 include soft-deleted coupons in lookup

This commit is contained in:
Corentin Huet 2026-07-31 15:51:42 +02:00
parent 8280ee5458
commit 56b4dd8da9

View file

@ -103,7 +103,7 @@ trait CouponTrait
{
$panierContents = $panier->panierContents()->get();
foreach ($panierContents as $key => $panierContent) {
$coupon = Coupon::where(['coupon_id' => $panierContent->panier_content_couponId])->first();
$coupon = Coupon::where(['coupon_id' => $panierContent->panier_content_couponId])->firstOrFail();
// ---- Contrôle de la publication
if ($coupon->coupon_published == 0) {
$panierContents->forget($key);