[Solved] i need to print currently no products in my laravel page using else condtion [closed]
Your question is unclear, but I think I know what you want to accomplish. Before your foreach you need to check the products count. If products are found, then loop them, if not, display a message. Try this: @if(count($data[‘products’])) @foreach ($data[‘products’] as $list) <div class=”col-6 col-md-4 tt-col-item”> <div class=”tt-product thumbprod-center”> <div class=”tt-description”> <div class=”tt-row”> </div> … Read more