<?php $__env->startSection('content'); ?>
 <link href="assets/css/plugins/dataTables/datatables.min.css" rel="stylesheet">

 <div class="row wrapper border-bottom white-bg page-heading">
                <div class="col-lg-10">
                    <h2>Products </h2>
                    <ol class="breadcrumb">
                        <li>
                            <a href="<?php echo e(url('')); ?>">Home</a>
                        </li>
                     
                        <li class="active">
                            <strong>Products</strong>
                        </li>
                    </ol>
                </div>
                <div class="col-lg-2">

                </div>
            </div>
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-lg-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>Products </h5>
                        <div class="ibox-tools">
						<a href="<?php echo e(url('products/create')); ?>" class="btn btn-primary btn-xs">Add New</a>
						
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
							
                          
                           
                        </div>
                    </div>
                    <div class="ibox-content">

                        <div class="table-responsive">
                    <table class="table table-striped table-bordered table-hover dataTables-example" >
					
					 <thead>
                        <tr>
                            <th>#</th>
                            <th>Photo</th>
                            <th>Name</th>
                            <th>Price</th>
                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                    <?php $__empty_1 = true; $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $product): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                        <tr class="gradeX">
                            <td><?php echo e($products->firstItem() + $key); ?></td>
                            <td><img width="100px" src="<?php echo e(url('uploads/products/thumb/1.jpg')); ?>"></td>
                            <td><?php echo e($product->name); ?></td>
                            <td><?php echo e($product->price); ?></td>
                            <td>
                                <form id="delete-product" action="<?php echo e(url('products/' . $product->id)); ?>" method="POST" class="form-inline">
                                    <input type="hidden" name="_method" value="delete">
                                    <?php echo e(csrf_field()); ?>

                                    <input type="submit" value="Delete" class="btn btn-danger btn-xs pull-right btn-delete">
                                </form>
                                 <a href="<?php echo e(url('products/' . $product->id . '/edit')); ?>" class="btn btn-primary btn-xs pull-right"><i class="fa fa-pencil-square-o"> </i> </a>
                            </td>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                        <?php echo $__env->make('partials.table-blank-slate', ['colspan' => 4], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                    <?php endif; ?>
                    </tbody>
		
					
                    </table>
                        </div>

                    </div>
                </div>
            </div>
            </div>
           
        </div>
       
	   
	    <script src="assets/js/plugins/dataTables/datatables.min.js"></script>

   
    <script>
        $(document).ready(function(){
            $('.dataTables-example').DataTable({
                dom: '<"html5buttons"B>lTfgitp',
                buttons: [
                    { extend: 'copy'},
                    {extend: 'csv'},
                    {extend: 'excel', title: 'Products'},
                    {extend: 'pdf', title: 'Products'},

                    {extend: 'print',
                     customize: function (win){
                            $(win.document.body).addClass('white-bg');
                            $(win.document.body).css('font-size', '10px');

                            $(win.document.body).find('table')
                                    .addClass('compact')
                                    .css('font-size', 'inherit');
                    }
                    }
                ]

            });

            


        });

        
    </script>
	
		
		
<?php /* <div class="container">
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <div class="panel-heading">Products
                    <div class="pull-right">

                        <a href="{{ url('products/create') }}" class="btn btn-primary btn-xs">Create</a>
                    </div>
                </div>
                <div class="panel-body">
                    <form method="GET">
                        <div class="form-group" style="margin:0">
                            <div class="input-group">
                                @if(!empty($keyword))
                                <span class="input-group-btn">
                                    <a href="{{ url('products') }}" class="btn btn-primary">Clear</a>
                                </span>
                                @endif
                                <input type="text" name="q" class="form-control" value="{{ $keyword }}">
                                <span class="input-group-btn">
                                    <button class="btn btn-success" type="submit">Search</button>
                                </span>
                            </div>
                        </div>
                    </form>
                </div>
                

                <div class="panel-footer" style="text-align: right;">
                    {{ $products->links() }}
                </div> 
            </div>
        </div>
    </div>
</div> */ ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>