@if(Auth::user()->can('delete', App\Product::class) || isset($vendor))
|
@endif
{{$product->id}} |
@if($product->photo)
@php
$image_url = \App\Helpers\Helper::check_image_avatar($product->photo->name, 50);
@endphp
@else
@endif
|
{{$product->name}} |
@if($product->vendor && isset($vendor) && $vendor)
@if($product->sku)
{{substr($product->sku, strpos($product->sku, '-') + 1)}} |
@else
- |
@endif
@if($product->hsn)
{{substr($product->hsn, strpos($product->hsn, '-') + 1)}} |
@else
- |
@endif
@else
{{$product->sku ? $product->sku : '-'}} |
{{$product->hsn ? $product->hsn : '-'}} |
@endif
{{$product->in_stock ? $product->in_stock : __('Out of Stock')}} |
{{currency_format($product->price)}} |
{{$product->tax_rate}} |
{{$product->category ? $product->category->name .' (' . __('ID:') . ' '.$product->category->id.')' : '-'}} |
{{$product->brand ? $product->brand->name : '-'}} |
{{$product->model ? $product->model : '-'}} |
{{$product->vendor ? $product->vendor->name : '-'}} |
@if(count($custom_fields = unserialize($product->custom_fields)) > 0 && is_array($custom_fields))
@php($i = 0)
@foreach($custom_fields as $key => $field)
@if(!empty($key) && !empty($field))
@php($i++)
- {{$key}}: {{$field}}
@endif
@endforeach
@if($i < 1)
-
@endif
@else
-
@endif
|
{{$product->is_active ? __('Active') : __('Inactive')}} |
{{$product->created_at->diffForHumans()}} |
{{$product->user ? $product->user->name .' @'.$product->user->username : '-'}} |
@if(Auth::user()->can('update', App\Product::class) || isset($vendor))
@endif
@if(Auth::user()->can('delete', App\Product::class) || isset($vendor))
@endif
|
@endforeach
@endif