@extends('layouts.app') @section('content')
@if(\Request::route()->getName() == 'get.product.bycategorySlug')

({{ $category->category_name }}) Products List

@elseif(\Request::route()->getName() == 'get.product.bycategory.bycategorySlug.bysubcategorySlug')

({{$subcategory->subcategory_name}}) Products List

@elseif(\Request::route()->getName() == 'search.product')

Search Products List

@elseif(\Request::route()->getName() == 'latest.product')

Latest Products

@endif
@forelse($products as $key => $product)
{{$product->product_name}}
Date Added: {{date('d F Y', strtotime($product->publish_date))}}
Licence: {{$product->subcategory->subcategory_name}}
Category: {{$product->category->category_name}}
Price: {{setPriceFormat($product->price)}}
{!! html_cut($product->product_details, 200) !!} More...
@empty

Sorry! No Product Found.

@endforelse
    {{-- $products->links() --}} {{$products->links('pagination::bootstrap-4')}}
@include('layouts.product_sidebar')
@endsection @if(\Request::route()->getName() == 'get.product.bycategorySlug') @if($category->slug != '') @php $cat_slug = $category->slug; @endphp @else @php $cat_slug = str_slug($category->category_name, '-'); @endphp @endif @push('js') @endpush @elseif(\Request::route()->getName() == 'get.product.bycategorySlug.bysubcategorySlug') @if($subcategory->category->slug != '') @php $cat_slug = $subcategory->category->slug; @endphp @else @php $cat_slug = str_slug($subcategory->category->category_name, '-'); @endphp @endif @if($subcategory->slug != '') @php $sub_slug = $subcategory->slug; @endphp @else @php $sub_slug = str_slug($subcategory->subcategory_name, '-'); @endphp @endif @push('js') @endpush @elseif(\Request::route()->getName() == 'latest.product') @push('js') @endpush @endif