/home2/mshostin/public_html/storage/framework/views/b5c4cb1cfdd808555336ba06a44eec9f676af9e7.php
<?php $__env->startSection('content'); ?>
<div class="row">
<div class="col-md-12">
<div class="card ">
<div class="card-header">
<div class="row">
<div class="col-8">
<h4 class="card-title">Products</h4>
</div>
<div class="col-4 text-right">
<a href="<?php echo e(route('products.create')); ?>" class="btn btn-sm btn-primary">New product</a>
</div>
</div>
</div>
<div class="card-body">
<?php echo $__env->make('alerts.success', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
<div class="">
<table class="table tablesorter " id="">
<thead class=" text-primary">
<th scope="col">Category</th>
<th scope="col">Product</th>
<th scope="col">Base Price</th>
<th scope="col">Stock</th>
<th scope="col">Faulty</th>
<th scope="col">Total Sold</th>
<th scope="col"></th>
</thead>
<tbody>
<?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td><a href="<?php echo e(route('categories.show', $product->category)); ?>"><?php echo e($product->category->name); ?></a></td>
<td><?php echo e($product->name); ?></td>
<td>Rs/ <?php echo e($product->price); ?></td>
<td><?php echo e($product->stock); ?></td>
<td><?php echo e($product->stock_defective); ?></td>
<td><?php echo e($product->solds->sum('qty')); ?></td>
<td class="td-actions text-right">
<a href="<?php echo e(route('products.show', $product)); ?>" class="btn btn-link" data-toggle="tooltip" data-placement="bottom" title="More Details">
<i class="tim-icons icon-zoom-split"></i>
</a>
<a href="<?php echo e(route('products.edit', $product)); ?>" class="btn btn-link" data-toggle="tooltip" data-placement="bottom" title="Edit Product">
<i class="tim-icons icon-pencil"></i>
</a>
<form action="<?php echo e(route('products.destroy', $product)); ?>" method="post" class="d-inline">
<?php echo csrf_field(); ?>
<?php echo method_field('delete'); ?>
<button type="button" class="btn btn-link" data-toggle="tooltip" data-placement="bottom" title="Delete Product" onclick="confirm('Are you sure you want to remove this product? The records that contain it will continue to exist.') ? this.parentElement.submit() : ''">
<i class="tim-icons icon-simple-remove"></i>
</button>
</form>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
</table>
</div>
</div>
<div class="card-footer py-4">
<nav class="d-flex justify-content-end">
<?php echo e($products->links()); ?>
</nav>
</div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', ['page' => 'List of Products', 'pageSlug' => 'products', 'section' => 'inventory'], \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\inventrySystem\resources\views/inventory/products/index.blade.php ENDPATH**/ ?>