<?php if (isset($component)) { $__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da = $component; } ?>
<?php $component = App\View\Components\AppLayout::resolve([] + (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag ? (array) $attributes->getIterator() : [])); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php if (isset($attributes) && $attributes instanceof Illuminate\View\ComponentAttributeBag && $constructor = (new ReflectionClass(App\View\Components\AppLayout::class))->getConstructor()): ?>
<?php $attributes = $attributes->except(collect($constructor->getParameters())->map->getName()->all()); ?>
<?php endif; ?>
<?php $component->withAttributes([]); ?>
    <?php $__env->startSection('title'); ?>
        Pages Management
    <?php $__env->stopSection(); ?>
    <!-- Page Heading -->
    <h1 class="h3 mb-2 text-gray-800">
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('blog create')): ?>
            <a href="<?php echo e(route('admin.product.create')); ?>" class="btn btn-primary"><i class="fas fa-plus" aria-hidden="true"></i>
                Add New Product
            </a>
        <?php endif; ?>
    </h1>
    <!-- DataTales Example -->
    <div class="card shadow mb-4">
        <div class="card-header py-3">
            <h6 class="m-0 font-weight-bold text-primary">
                Categories
            </h6>
        </div>
        <div class="card-body">
            <div class="table-responsive">
                <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
                    <thead>
                        <tr>
                            <th>No</th>
                            <th>Product name</th>
                            <th>image</th>
                            <th>Price</th>
                            <th>Sort description</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $datas; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $data): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                            <tr>
                                <td><?php echo e($data->id); ?> </td>
                                <td><?php echo e($data->name); ?> </td>
                                <td> <img style="width: 60px" src="<?php echo e(asset($data->image)); ?>" alt=""> </td>
                                <td> <?php echo e($data->price); ?> </td>
                                <td> <?php echo e($data->sort_description); ?> </td>
                                <td>
                                    <div class="d-flex">
                                        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('product edit')): ?>
                                        <a href="<?php echo e(route('admin.product.edit',$data->id)); ?>" class="btn btn-primary">Edit</a>
                                    <?php endif; ?>

                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('product delete')): ?>
                                        <form action="<?php echo e(route('admin.product.destroy',$data->id)); ?>" method="POST">
                                            <?php echo csrf_field(); ?>
                                            <?php echo method_field('delete'); ?>
                                            <button type="submit" class="btn btn-danger ml-1">Delete</button>
                                        </form>
                                    <?php endif; ?>
                                    </div>



                                </td>
                            </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                    </tbody>
                </table>
            </div>
        </div>
    </div>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da)): ?>
<?php $component = $__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da; ?>
<?php unset($__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da); ?>
<?php endif; ?>
<?php /**PATH /home/raj/Documents/teamprojects/kik/resources/views/admin/product/index.blade.php ENDPATH**/ ?>