fix: 🐛 include soft-deleted coupons in lookup
This commit is contained in:
parent
8280ee5458
commit
56b4dd8da9
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue