@extends('panel::layouts.app') @section('body-class', 'page-product') @section('title', __('panel/menu.products')) @section('page-title-right') {{ __('panel/common.create') }} @endsection @section('content')
@include('panel::products.bulk.actions')
@if ($products->count())
@hookinsert('panel.product.list.table.header.after') @foreach ($products as $product) @hookinsert('panel.product.list.table.row.after', $product) @endforeach
{{ __('panel/common.id') }} {{ __('panel/common.image') }} {{ __('panel/common.name') }} {{ __('panel/product.price') }} {{ __('panel/product.quantity') }} {{ __('panel/common.created_and_updated') }} {{ __('panel/common.active') }}{{ __('panel/common.actions') }}
{{ $product->id }} {{ sub_string($product->fallbackName(),20) }} @if($product->isMultiple())  M @endif {{ currency_format($product->masterSku->price ?? 0) }} {{ $product->totalQuantity() }}
{{ \Carbon\Carbon::parse($product->created_at)->format('Y-m-d') }}
{{ \Carbon\Carbon::parse($product->updated_at)->format('Y-m-d') }}
@include('panel::shared.list_switch', ['value' => $product->active, 'url' =>panel_route('products.active', $product->id)])
@csrf @method('DELETE') {{ __('panel/common.delete')}}
{{ $products->withQueryString()->links('panel::vendor/pagination/bootstrap-4') }} @else @endif {{-- Bulk Actions Modals --}} @include('panel::products.bulk.modals')
@endsection @push('footer') @endpush