@extends('frontend.layouts.app') @php if(isset($data['category']->meta_title)) $title = $data['category']->meta_title; else $title = $data['category']->name . ' - ' . app_name(); if($data['category']->do_index == 'N' || $data['category']->status == 'N') $no_index = 'NOINDEX'; @endphp @section('title', $title) @if(trim($data['category']->meta_keywords) != null) @section('meta_keywords', $data['category']->meta_keywords) @endif @if(trim($data['category']->meta_description) != null) @section('meta_description', $data['category']->meta_description) @endif @if($data['category']->is_canonical == 'Y') @php if($data['category']->canonical_url != '') $url = $data['category']->canonical_url; else $url = URL::to( '/' . $data['category']->slug); @endphp @push('head-area') @endpush @endif @if(isset($no_index)) @push('head-area') @endpush @endif @section('content')

{{ $data['category']->name }}

{!! $data['category']->description !!}
@php $categories_with_subs = []; $show_sub_heading = false; @endphp @foreach($data['categories'] as $category) @php if($category->link_type == 'category') $cp = 1; else $cp = count($category->products); @endphp @if($cp > 0) {!! \App\Models\Category::categoryBlock($category) !!} @php $show_sub_heading = true; @endphp @else @php array_push($categories_with_subs, $category); @endphp @endif @endforeach @if(count($categories_with_subs) > 0)
@if($show_sub_heading)

More in {{ $data['category']->name }}

@endif
@foreach($categories_with_subs as $category) {!! \App\Models\Category::categoryOnlyBlock($category) !!} @endforeach
@endif
@push('head-area') @endpush @push('after-scripts') @endpush @endsection