@extends('layouts.app') @section('content')
{{-- list side bar start--}}
@include('components.err')

@yield('list-title')

@if(hasRoute('trashed')) @endif
@yield('filter')
{{__("Total")}} ({{$items->total()}})

{{__("From - To")}} @paginated($items)
@if(hasRoute('bulk'))

{{__("Bulk actions:")}}

@csrf
@endif
{{-- list side bar end--}} {{-- list content start--}}
@if(isset($items[0]) && method_exists($items[0],'imgUrl')) @endif @foreach($cols as $col) @endforeach {{-- @yield('table-head')--}} @if(count($items) == 0) @else @foreach($items as $item) @if(isset($item) && method_exists($item,'imgUrl')) @endif @foreach($cols as $k => $col) @if($k == 0 && hasRoute('edit')) @else @endif @endforeach {{-- @yield('table-body')--}} @endforeach @endif {{-- pagination and toggle button start --}} {{-- pagination and toggle button end --}}
{{__("image")}} {{__($col)}}
{{__("There is nothing to show!")}}
{{strip_tags($item?->{$cols[0]}) }} @switch($col) @case('parent_id') {{ $item->parent?->{$cols[0]}??'-' }} @break @case('status')
@break @case('user_id') @if($item->user != null) {{ $item->user?->name??'-' }} @else {{__("Removed")}} @endif @break @case('customer_id') @if($item->customer != null) {{ $item->customer?->name??'-' }} @else {{__("Removed")}} @endif @break @case('category_id') @if($item->category != null) {{ $item->category?->name??'-' }} @else {{__("Removed")}} @endif @break @case('state_id') @if($item->state != null) {{ $item->state?->name??'-' }} @else {{__("Removed")}} @endif @break @case('product_id') @if($item->product != null) {{ $item->product?->name??'-' }} @else {{__("Removed")}} @endif @break @case('expire') @case('created_at') @case('updated_at') {{$item->$col?->ldate("Y-m-d H:i")??'-'}} @break @case('icon') @break @default @if(substr($col,0,3) == 'is_') @if($item->$col == 1) @endif @elseif(gettype($item->$col) == 'integer') {{number_format($item->$col)}} @else {{$item->$col}} @endif @endswitch
@if(strpos(request()->url(),'trashed') != false && hasRoute('restore')) @else @endif
@foreach($buttons as $btn => $btnData) @if(strpos($btnData['class'],'delete') == false ) @if(strpos(request()->url(),'trashed') == false) @endif @else @if( hasRoute('restore') && $item->trashed()) @else @endif @endif @endforeach @if(config('app.xlang.active') && isset($item->translatable)) @endif
{{$items->withQueryString()->links()}}
{{-- list content end--}}
@yield('list-foot') @if(hasRoute('create')) @endif @endsection