@php $popularCoupon = getContent('categories.content', true); $popularCouponElements = App\Models\Category::with('coupons')->where('status', 1)->latest()->limit(8)->get(); $firstAd = App\Models\Ad::first(); @endphp @if($firstAd) @else @endif {{__($popularCoupon->data_values->heading)}} @lang('View More') @foreach($popularCouponElements as $item) @if($item->page == 1) @if (strlen(__($item->name)) > 20) {{ substr(__($item->name), 0, 20) . '...' }} @else {{ __($item->name) }} @endif {{ $item->brands->count() }} @lang('brands') @endif @endforeach @push('script') @endpush