@php $columns = [ ['label' => 'Id', 'column' => 'id', 'sort' => true], ['label' => 'Name', 'column' => 'name', 'sort' => true], ['label' => 'Position', 'column' => 'position', 'sort' => true], ['label' => 'Slug', 'column' => 'slug', 'sort' => true], ['label' => 'Status', 'column' => 'status', 'sort' => true], ['label' => 'Actions', 'column' => 'action', 'sort' => false], ]; @endphp @foreach ($categories as $key => $item) {{ $item->id }} {{-- --}} {{ $item->name }} {{ $item->position }} {{ $item->slug }} @if ($item->status) Active @else In-Active @endif {{-- {{$item->products->count()}} --}} {{-- --}} {{-- --}}
@csrf
@csrf
@endforeach
@push('scripts') @endpush