@php $products = \App\Module\Db\Product::getInstance()->getProductsByActive(); $countProduct = (isset($products) && is_array($products)) ? count($products) : 0; $vouchers = \App\Module\Db\Voucher::getInstance()->getVouchersByActive(); $countVoucher = (isset($vouchers) && is_array($vouchers)) ? count($vouchers) : 0; $rulesDb = $promotion->rules ?? []; @endphp

{{trans('admin::promotion.title.rule')}}

@if(count($rulesDb) > 0) @foreach($rulesDb as $ruleIdx=>$ruleNGift) @include('admin.promotions.elements.product') @endforeach @else @include('admin.promotions.elements.product', [ 'ruleIdx' => 0 ]) @endif
{{trans('admin::promotion.rule.gift.buy')}} {{trans('admin::promotion.rule.gift.label')}} {{trans('admin::action.label')}}