@extends('panel::layouts.app') @section('body-class', 'page-product') @section('title', __('panel/menu.products')) @section('page-title-right') {{ __('panel/common.create') }} @endsection @section('content')
@if ($products->count())
@foreach ($products as $product) @endforeach
{{ __('panel/common.id') }} {{ __('panel/common.image') }} {{ __('panel/common.name') }} {{ __('panel/product.price') }} {{ __('panel/product.quantity') }} {{ __('Category') }} {{ __('Owner') }} {{ __('panel/common.created_at') }} {{ __('panel/common.active') }} {{ __('panel/common.actions') }}
{{ $product->id }} {{ $product->translation->name ?? '' }} @if($product->isMultiple())  M@endif {{ currency_format($product->masterSku->price ?? 0) }} {{ $product->masterSku->quantity ?? 0 }} {{ $product->categories->map(function($category) { return $category->translation->name ?? ''; })->filter()->implode(', ') ?: '0' }} {{ $product->users->name ?? 0 }} {{ $product->created_at }} @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
@endsection @push('footer') @endpush