

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

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

      </div>
  <?php endif; ?>
  <?php if(session('error')): ?>
      <div class="alert alert-danger">
          <?php echo e(session('error')); ?>

      </div>
  <?php endif; ?>
  <div class="card">
    <div class="card-body">
  <div class="address">
    <div class="add-head p-3">
      CONTACT
    </div>
    <form action="<?php echo e(isset($data) ? route('admin.contact-widget.update', $data->id) : route('admin.contact-widget.store')); ?>" method="POST">
      <?php echo csrf_field(); ?>
      <?php if(isset($data)): ?>
        <?php echo method_field('PUT'); ?>
      <?php endif; ?>
      <div class="add-content text-orange p-2">
        <div class="form-group">
          <label for="openingDayFrom">Opening day From:</label>
          <select class="form-control" id="openingDayFrom" name="opening_day_from" required>
            <option value="">Select Opening Day</option>
            <?php
            $daysOfWeek = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
            ?>
            <?php $__currentLoopData = $daysOfWeek; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $day): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <option value="<?php echo e($day); ?>" <?php echo e((isset($data) && $data->opening_day_from == $day) ? 'selected' : (old('opening_day_from') == $day ? 'selected' : '')); ?>>
              <?php echo e($day); ?>

            </option>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
          </select>
          <?php if($errors->has('opening_day_from')): ?>
            <span class="text-danger"><?php echo e($errors->first('opening_day_from')); ?></span>
          <?php endif; ?>
        </div>
        <div class="form-group">
          <label for="openingDayTo">Opening day To:</label>
          <select class="form-control" id="openingDayTo" name="opening_day_to" required>
            <option value="">Select Opening Day</option>
            <?php $__currentLoopData = $daysOfWeek; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $day): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <option value="<?php echo e($day); ?>" <?php echo e((isset($data) && $data->opening_day_to == $day) ? 'selected' : (old('opening_day_to') == $day ? 'selected' : '')); ?>>
              <?php echo e($day); ?>

            </option>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
          </select>
          <?php if($errors->has('opening_day_to')): ?>
            <span class="text-danger"><?php echo e($errors->first('opening_day_to')); ?></span>
          <?php endif; ?>
        </div>
        
        
        <div class="form-group">
          <label for="openingTimeFrom">Opening time From:</label>
          <input type="time" class="form-control" id="openingTimeFrom" name="opening_time_from" required value="<?php echo e(isset($data) ? $data->opening_time_from : old('openingTimeFrom')); ?>">
          <?php if($errors->has('opening_time_from')): ?>
            <span class="text-danger"><?php echo e($errors->first('opening_time_from')); ?></span>
          <?php endif; ?>
        </div>
        <div class="form-group">
          <label for="openingTimeTo">Opening time To:</label>
          <input type="time" class="form-control" id="openingTimeTo" name="opening_time_to" required value="<?php echo e(isset($data) ? $data->opening_time_to : old('openingTimeTo')); ?>">
          <?php if($errors->has('opening_time_to')): ?>
            <span class="text-danger"><?php echo e($errors->first('opening_time_to')); ?></span>
          <?php endif; ?>
        </div>
        <div class="form-group">
          <label for="contactNo">Contact No.:</label>
          <input type="tel" class="form-control" id="contactNo" name="contact_number" required value="<?php echo e(isset($data) ? $data->contact_number : old('contactNo')); ?>">
          <?php if($errors->has('contact_number')): ?>
            <span class="text-danger"><?php echo e($errors->first('contact_number')); ?></span>
          <?php endif; ?>
        </div>
        <div class="form-group">
          <label for="address">Address:</label>
          <textarea class="form-control" id="address" name="address" required><?php echo e(isset($data) ? $data->address : old('address')); ?></textarea>
          <?php if($errors->has('address')): ?>
            <span class="text-danger"><?php echo e($errors->first('address')); ?></span>
          <?php endif; ?>
        </div>
      </div>
      <button type="submit" class="btn btn-primary"><?php echo e(isset($data) ? 'Update' : 'Create'); ?></button>
    </form>
  </div>
</div>
</div>
</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\laragon\www\bioessenza\resources\views/admin/enquiry/contact_widget.blade.php ENDPATH**/ ?>