56 lines
No EOL
1.9 KiB
PHP
56 lines
No EOL
1.9 KiB
PHP
<?php $__env->startSection('main_content'); ?>
|
|
|
|
|
|
<h2>Products In Site</h2>
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<p>
|
|
<a class="btn btn-primary" href="<?php echo e(url('cms/products/create')); ?>">+Add New Product</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
<br><br>
|
|
|
|
<div class="row">
|
|
<div class="col-md-8">
|
|
<table class="table table-bordered">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Image</th>
|
|
<th>Title</th>
|
|
<th>Body</th>
|
|
<th>Stock</th>
|
|
<th>On Sale</th>
|
|
<th>Updated_at</th>
|
|
<th>Created_at</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
|
|
<tr>
|
|
<td>#<?php echo e($item['id']); ?></td>
|
|
<td><img width="60" src="<?php echo e(asset('images').'/'. $item['image']); ?>" alt=""></td>
|
|
<td><?php echo e($item['title']); ?></td>
|
|
<td><?php echo $item['body']; ?></td>
|
|
<td><?php echo e($item['stock']); ?></td>
|
|
<?php if($item['sale']): ?>
|
|
<td style="color:orange"><b>Yes</b></td>
|
|
<?php else: ?>
|
|
<td style="color:green"><b>No</b></td>
|
|
<?php endif; ?>
|
|
<td><?php echo e($item['updated_at']); ?></td>
|
|
<td><?php echo e($item['created_at']); ?></td>
|
|
<td>
|
|
<a href="<?php echo e(url('cms/products/'.$item['id'] . '/' . 'edit')); ?>">Edit </a>|
|
|
<a href="<?php echo e(url('cms/products' .'/' . $item['id'])); ?>">Delete</a>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<?php $__env->stopSection(); ?>
|
|
|
|
<?php echo $__env->make('cms.cms-master', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
|