File: /var/www/kosmicfarms/storage/framework/views/27c075023ef44c27be93011ddbfb818f04ecfc19.php
<?php $__env->startSection('content'); ?>
<div class="d-sm-flex align-items-center justify-content-between mg-b-20 mg-lg-b-25 mg-xl-b-30">
<div>
<nav aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-style1 mg-b-10">
<li class="breadcrumb-item"><a href="<?php echo e(url('/')); ?>">Dashboard</a></li>
<li class="breadcrumb-item active" aria-current="page">Products</li>
</ol>
</nav>
<h4 class="mg-b-0 tx-spacing--1">Products</h4>
</div>
<div class="d-none d-md-block">
<a href="<?php echo e(url('/products/create')); ?>" class="btn btn-sm pd-x-15 btn-white btn-uppercase"><i data-feather="mail" class="wd-10 mg-r-5"></i> Add Product</a>
</div>
</div>
<!-- ============================================================== -->
<!-- Content Start -->
<!-- ============================================================== -->
<h4 id="section2" class="mg-b-10">List of Products</h4>
<p class="mg-b-30">Products informations.</p>
<div class="row">
<div class="col-md-12">
<table id="products" class="table">
<thead>
<tr>
<th scope="col">Product Type</th>
<th scope="col">Category</th>
<th scope="col">Name</th>
<th scope="col">Quantity</th>
<th scope="col">Price</th>
<th scope="col">Farm</th>
<th scope="col">Action</th>
</tr>
</thead>
<tbody>
<?php if(isset($products)): ?>
<?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>_
<tr>
<td><?php if(isset($product->producttype)): ?><?php echo e($product->producttype->name); ?><?php endif; ?></td>
<td><?php if(isset($product->category)): ?><?php echo e($product->category->name); ?><?php endif; ?></td>
<td><?php echo e($product->name); ?></td>
<td><?php echo e($product->quantity); ?></td>
<td><?php echo e($product->price); ?></td>
<td><?php echo e($product->farm); ?></td>
<td>
<form method="post" action="<?php echo e(url('/products/'.$product->id.'/delete')); ?>" class="form-horizontal">
<?php echo csrf_field(); ?>
<a href="<?php echo e(url('/products/'.$product->id.'/edit')); ?>" class="btn btn-warning btn-rounded">Edit</a>
<input type="hidden" name="delete" value="true">
<button type="submit" class="btn btn-danger btn-rounded" id="danger-alert">Delete</button>
</form>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
</tbody>
</table>
</div>
</div>
<!-- ============================================================== -->
<!-- Content End -->
<!-- ============================================================== -->
<?php $__env->stopSection(); ?>
<?php $__env->startSection('jscript'); ?>
<script src="<?php echo e(asset('admin/lib/datatables.net/js/jquery.dataTables.min.js')); ?>"></script>
<script src="<?php echo e(asset('admin/lib/datatables.net-dt/js/dataTables.dataTables.min.js')); ?>"></script>
<script>
$(document).ready(function () {
$('#products').DataTable({
language: {
searchPlaceholder: 'Search...',
sSearch: '',
lengthMenu: '_MENU_ items/page',
}
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/kosmicfarms/resources/views/products/index.blade.php ENDPATH**/ ?>