@extends('layouts.master') @section('content')
Products

Products List @if (isset($brand_id)) @can('Products add') Add New Product @endcan @can('Products list') Back to Brands @endcan @endif

@php if(isset($brand_id)) { $grnID = $brand_id; } else { $grnID = ''; } @endphp
{{-- --}} @if (isset($brand_id)) @endif @foreach ($products as $key => $product) @php $color = ''; if ($product->products_status == 0) { $color = '#f5c5c5'; } $units = App\Measurement_unit::where( 'id_measurement_unit', $product->measurement_unit_id)->first(); @endphp {{-- --}} @endforeach {{-- --}} @if (isset($brand_id)) @endif
S.No Brand Name Product Name Category Sale Price In Stock Threshold Measurement Unit Qty Per Unit Purchase Price Retail Price ImagesStatusAction
{{ $key + 1 }} {{ $product->brand->brands_name }} {{ $product->products_name }} {{ $product->category ? $product->category->products_category_name : 'No Category' }} {{ $product->products_sale_price }} {{ $product->in_stock != null ? $product->in_stock : '0' }} {{ $product->products_threshold }} {{ $units ? $units->measurement_unit_name : 'null' }} {{ $product->products_qt_per_unit }} {{ $product->products_purchase_price }} {{ $product->products_retail_price }} @if ($product->products_status == 1) @else @endif @if (isset($brand_id)) @can('Stocks list') @if ($product->products_status == 1) Stock @endif @endcan @can('Products edit') Edit @endcan @can('Products delete') Remove @endcan @endif
S.No Brand Name Product Name Category Sale Price In Stock Threshold Measurement Unit Qty Per Unit Purchase Price Retail Price ImagesStatusAction
@endsection @push('scripts') @endpush