@extends('layouts.main') @section('page-id', '60390fd5fe1ae668a23f9e7b') @section('body-class', 'pale-green') @section('content')
@if ($category->tagline)

{{ $category->name }}

@else

{{ $category->name }}

@endif
{!! $category->description !!}
{{-- --- Products Section --- --}} @if ($category->products->isNotEmpty())

Products

@foreach ($category->products as $product) @php $detailsType = $product->pivot->has_unique_details ? $product->pivot->type : $product->type; @endphp @if ($detailsType === 'mixtures') @elseif ($detailsType === 'flower') @elseif ($detailsType === 'cover_mixture') @elseif ($detailsType === 'agri_enviro') @elseif ($detailsType === 'herb_legume') @else @endif @endforeach
@endif {{-- --- Subcategories Section --- --}} @if($category->children->isNotEmpty())

Categories

@foreach ($category->children as $child)

{{ $child->name }}

{{ $child->short_description }}

@endforeach
@endif
@if($category->children->isEmpty() && $category->products->isEmpty())

All {{ $category->name }}

{{-- --- No Products/Subcategories --- --}}

There are currently no products in the {{ $category->name }} category.

@endif @endsection