To
@if (session()->has('error_msg'))
{!! session('error_msg') !!}
@endif
@php $columns = [ ['label' => 'Id', 'column' => 'id', 'sort' => true], ['label' => 'Image', 'column' => 'image_url ', 'sort' => false], ['label' => 'SKU', 'column' => 'sku ', 'sort' => true], ['label' => 'Name', 'column' => 'name', 'sort' => true], ['label' => 'New Name', 'column' => 'name', 'sort' => false], ['label' => 'New', 'column' => 'is_new', 'sort' => false], ['label' => 'Featured', 'column' => 'is_featured', 'sort' => false], ['label' => 'Status', 'column' => 'status', 'sort' => true], ['label' => 'Price', 'column' => 'price', 'sort' => true], ['label' => 'New Price', 'column' => 'price', 'sort' => false], ['label' => 'Actions', 'column' => 'action', 'sort' => false], ]; $type = 'product'; @endphp @foreach ($products as $key => $item) {{ $item->id }} @if (count($item->images)) @else @endif {{ $item->sku }} {{ $item->name }} {{ $item->is_new ? 'Yes' : 'No' }} {{ $item->is_featured ? 'Yes' : 'No' }} @if ($item->status) Active @else In-Active @endif $ {{ $item->price }} {{-- --}} {{-- --}}
@csrf
@csrf
@endforeach
@push('scripts') @endpush