{{-- @php dd($products); @endphp --}} @extends('frontend.components.layout') @section('title') Search @endsection @push('css') @endpush @section('content')
{{--
--}} @if ($products->count() == 0)

No Product Found!

@endif
@forelse ($products as $product)
@php $thumbnail = json_decode($product->thumbnail, true); @endphp

{{ $product->name }}

@php $sellingPrice = $product->selling_price; $discountPrice = $product->discount_price; $finalPrice = $sellingPrice - $discountPrice; $formattedPrice = number_format($finalPrice, 2); @endphp @if ($product->discount_price > 0 && $product->selling_price > $product->discount_price) ৳ {{ number_format($product->selling_price, 2) }} ৳ {{ $formattedPrice }} {{-- {{ number_format($product->selling_price - $product->discount_price, 2) }} --}} @else ৳ {{-- {{ $formattedPrice }} --}} {{ number_format($product->selling_price, 2) }} @endif
@empty @endforelse
{{--
--}}
{{ $products->links() }}
{{-- --}}
@endsection