@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--}}
@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($col == 'parent_id') {{ $item->parent?->{$cols[0]}??'-' }} @break @case($col == 'status')
@break @case($col == 'user_id') {{ $item->user?->name??'-' }} @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