

<?php
  $title = "Add Shipping";
  $button_text = "Add Shipping";
  if(!empty($shipping)) {
    $title = "Edit Shipping";
    $button_text = "Update Shipping";
  }
?>

<?php $__env->startSection('title', $title); ?>


<?php $__env->startSection('content'); ?>
    <!-- Main content -->
    <section class="py-0">
      <div class="container-fluid">
        <div class="card card-primary">
          <div class="card-header">
            <h3 class="card-title"><?php echo e($title); ?></h3>
          </div>
          <!-- /.card-header --> 
          
          <?php if(!empty($shipping)): ?>
            <form method="POST" action="<?php echo e(route('shippings.update')); ?>" enctype="multipart/form-data">
          <?php else: ?>
              <form method="POST" action="<?php echo e(route('shippings.store')); ?>" enctype="multipart/form-data">
          <?php endif; ?>
          <?php echo csrf_field(); ?>

                                                        <?php if(session()->has('failure')): ?>
                                                            <div class="alert alert-danger">
                                                                <?php echo e(session()->get('failure')); ?>

                                                            </div>
                                                        <?php endif; ?>

                                                        <?php if(session()->has('success')): ?>
                                                            <div class="alert alert-success">
                                                                <?php echo e(session()->get('success')); ?>

                                                            </div>
                                                        <?php endif; ?> 
          <div class="card-body">
               <input type="hidden" name="shipping_id" value="<?php echo e(!empty($shipping->id)? $shipping->id : ""); ?>"
            <div class="col-6">
              <div class="form-group">
                  <label class="col-form-label" for="name"><b>Pincode</b></label>
                  <input type="text" class="form-control" id="name" name="pincode" value="<?php echo e(!empty($shipping->pincode)? $shipping->pincode : ""); ?>" placeholder="Pincode" required>
              </div>
            </div>

            <div class="col-6">
              <div class="form-group">
                  <label class="col-form-label" for="name"><b>Price</b></label>
                  <input type="text" class="form-control" id="name" name="price" value="<?php echo e(!empty($shipping->price)? $shipping->price : ""); ?>" placeholder="Price" required>
              </div>
            </div>

            

            

          </div>
          <!-- /.card-body -->
          <div class="card-footer">
            <button type="submit" class="btn btn-primary"><?php echo e($button_text); ?></button>
          </div>
          <!-- /.card-footer -->
          </form>
        </div>
      </div>
    </section>
    <!-- /.content -->
<?php $__env->stopSection(); ?>
<?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/create.blade.php ENDPATH**/ ?>