
<?php $__env->startSection('title', 'All Shippings'); ?>
<?php $__env->startSection('content'); ?>
<!-- Main content -->
<section class="content">
  <div class="container-fluid">
                 <div class="row">
                    <div class="col-10">
                          <h3 class="mb-2 main-heading">Shippings</h3>
                    </div>
                    <div class="col-2">
                            <a style="text-decoration: underline;" href="<?php echo e(route('shippings.create')); ?>"><span class="btn btn-warning">Add</span></a>
                    </div>
                </div>

    <div class="row">
                        <div class="col-lg-12">
                            
                            <div class="table-responsive bg-white p-3">
                            <table class="table table-head-fixed text-nowrap" id="example">
                                <thead>
                                  <tr>
                                    <th>#</th>
                                    <th>Pincode</th>
                                    <th>Price</th>
                                    <th>Status</th>
                                    <th>Action</th>
                                  </tr>
                                </thead>
                                <tbody>
                                  <?php if($shippings->count() > 0): ?>
                                    <?php $__currentLoopData = $shippings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ship): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                      <td><?php echo e($loop->iteration); ?></td>
                                      <td>
                                        <?php echo e($ship->pincode); ?>

                                      </td>
                                      <td><?php echo e($ship->price); ?></td>
                                      <td>
                                                      <?php if($ship->status): ?>
                                                              <?php $statusBtn = '<a title="Deactivate" href="'. route('change_status', ['type' => 'shipping', 'id' => $ship->id, 'status' => '0']) .'" class="btn btn-danger btn-sm"><i class="fa fa-user-times" aria-hidden="true"></i></a>' ?>
                                                                  Active
                                                              <?php else: ?>
                                                                  <?php $statusBtn = '<a title="Activate" href="'. route('change_status', ['type' => 'shipping', 'id' => $ship->id, 'status' => '1']) .'" class="btn btn-success btn-sm"><i class="fa fa-user-plus" aria-hidden="true"></i></a>' ?>
                                                                  Deactive
                                                              <?php endif; ?>
                                      </td>
                                      <td>
                                                              <?php echo $statusBtn; ?>

                                                              <a style="text-decoration: underline;" href="<?php echo e(route('shippings.edit', $ship->id)); ?>"><span class="btn btn-warning"><i class="fa fa-pencil-alt" aria-hidden="true"></i></span></a>
                                                              <!-- <button class="btn btn-warning" ><i class="fa fa-plus" aria-hidden="true"></i></button> -->
                                      </td>
                                    </tr>
                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                  <?php else: ?>
                                    <tr>
                                      <td colspan="5">No Data</td>
                                    </tr>
                                  <?php endif; ?>
                                </tbody>
                              </table>
                            </div>
                        </div>
                    </div>
    <!-- /.row -->
  </div>
</section>
<!-- /.content -->
<?php $__env->stopSection(); ?>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/1.11.1/js/jquery.dataTables.js" defer></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/buttons/2.0.0/js/dataTables.buttons.min.js" defer></script>
<script type="text/javascript" charset="utf8" src="https://cdnjs.cloudflare.com/ajax/libs/jszip/3.1.3/jszip.min.js" defer></script>
<script type="text/javascript" charset="utf8" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/pdfmake.min.js" defer></script>
<script type="text/javascript" charset="utf8" src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.1.53/vfs_fonts.js" defer></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/buttons/2.0.0/js/buttons.html5.min.js" defer></script>
<script type="text/javascript" charset="utf8" src="https://cdn.datatables.net/buttons/2.0.0/js/buttons.print.min.js" defer></script>

<script>



    $(document).ready(function() {
        $('#example').DataTable( {
            dom: 'Bfrtip',
            buttons: [
                 ''
            ]
        } );

} );

    
</script>
<?php echo $__env->make('admin.layouts.dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\chittar\resources\views/admin/shipping/index.blade.php ENDPATH**/ ?>