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

@yield('list-title')

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

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

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

@csrf
@endif
{{-- list side bar end--}} {{-- list content start--}}
@foreach($cols as $col) @endforeach @yield('table-head') @if(count($items) == 0) @else @foreach($items as $item) @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 --}}
{{__($col)}}
{{__("There is nothing to show!")}}
{{$item?->{$cols[0]} }} @switch($col) @case($col == 'parent_id') {{ $item->parent?->{$cols[0]}??'-' }} @break @default {{$item->$col}} @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
{{$items->withQueryString()->links()}}
{{-- list content end--}}
@if(hasRoute('create')) @endif @endsection