@extends('layouts.admin') @section('h1') Products categories @stop @section('content')
@if (count($objects) > 0)
@foreach($objects as $object) @foreach($object->child_categories as $child_category) @endforeach @endforeach
Picture ID Title Products Views count Is active Created Actions
@if($object->picture_filename) @endif {{$object->id}} {{$object->admin_title}} @if($object->child_categories) {{$object->child_categories->sum('products_count')}} @else 0 @endif {{$object->views_count}} {{$object->is_active ? 'yes' : 'no'}} {{$object->created_at->diffForHumans()}} {!!Form::open(['route' => ['admin.products-categories.destroy', $object->id], 'method' => 'delete'])!!} {!!Form::close()!!}
@if($child_category->picture_filename) @endif {{$child_category->id}} {{$child_category->admin_title}} {{$child_category->products_count}} {{$child_category->views_count}} {{$child_category->is_active ? 'yes' : 'no'}} {{$child_category->created_at->diffForHumans()}} {!!Form::open(['route' => ['admin.products-categories.destroy', $child_category->id], 'method' => 'delete'])!!} {!!Form::close()!!}
{!!$objects->render()!!}
@else No items. @endif
@stop @section('footer_js') @stop