

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


<!-- Begin Page Content -->
<div class="container-fluid">
 

  <!-- DataTales Example -->
  <div class="card shadow mb-4">
    <div class="card-header py-3">
      <h6 class="m-0 font-weight-bold text-primary"><?php echo e(__('messages.Vendor')); ?></h6>
      <?php if(count($errors) > 0): ?>
                  <?php if($errors->any()): ?>
                    <div class="alert alert-primary" role="alert">
                      <?php echo e($errors->first()); ?>

                      <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                        <span aria-hidden="true">×</span>
                      </button>
                    </div>
                  <?php endif; ?>
              <?php endif; ?>
                            <form action="<?php echo e(route('searchvendor')); ?>" method="post">
        <?php echo e(csrf_field()); ?>

<input type="text" value=""  name="vendorname" class="form-control" placeholder="<?php echo e(__('messages.Vendor Name')); ?>" style="width: 20%; display: inline;">
    <button type="submit" class="btn btn-success btn-md" value="Search" style="margin-top: -5px;"><i class="fa fa-search"></i></button>
</form>
        <a class="btn btn-success m-auto" style="float: right;" href="<?php echo e(route('add-vendor')); ?>"><?php echo e(__('messages.Add')); ?></a>
    </div>
    <div class="card-body">
      <div class="table-responsive">
        <table class="table table-bordered" id="dataTable" width="100%" cellspacing="0">
          <thead>
            <tr>
            <th><?php echo e(__('messages.serial no')); ?></th>
            <th><?php echo e(__('messages.Vendor Name')); ?></th>
            <th><?php echo e(__('messages.owner name')); ?></th>
            <th><?php echo e(__('messages.Vendor Mobile')); ?></th>
            <th><?php echo e(__('messages.Vendor Email')); ?></th>
            <th><?php echo e(__('messages.Vendor Image')); ?></th>
            <th><?php echo e(__('messages.Action')); ?></th>
            </tr>
          </thead>
         
          <tbody>
          <?php if(count($vendor)>0): ?>
                          <?php $i=1; ?>
                          <?php $__currentLoopData = $vendor; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $vendors): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><?php echo e($i); ?></td>
                            <td><?php echo e($vendors->vendor_name); ?></td>
                            <td><?php echo e($vendors->owner); ?></td>
                            <td><?php echo e($vendors->vendor_phone); ?></td>
                            <td><?php echo e($vendors->vendor_email); ?></td>
                            <td align="center"><img src="<?php echo e(url($vendors->vendor_logo)); ?>" style="width: 21px;"></td>
                            <td>
                                <a href="<?php echo e(route('vendorsecretlogin',$vendors->vendor_id)); ?>" style="width: 28px; padding-left: 6px;background-color:#000;border-color:#000;" class="btn btn-info"  style="width: 10px;padding-left: 9px;" style="color: #fff;">
                                    <i class="fa fa-user-secret" style="width: 10px;"></i>
                                </a>
                                <a href="<?php echo e(route('edit-vendor',$vendors->vendor_id)); ?>" style="width: 28px; padding-left: 6px;" class="btn btn-info" style="width: 10px;padding-left: 9px;" style="color: #fff;">
                                    <i class="fa fa-edit" style="width: 10px;"></i>
                                </a>
							    <button type="button" style="width: 28px; padding-left: 6px;" class="btn btn-danger" data-toggle="modal" data-target="#exampleModal<?php echo e($vendors->vendor_id); ?>">
							        <i class="fa fa-trash"></i>
							    </button>
							</td>

                        </tr>
                        <?php $i++; ?>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                      <?php else: ?>
                        <tr>
                          <td>No data found</td>
                        </tr>
                      <?php endif; ?>
                       
          </tbody>
        </table>
      </div>
    </div>
  </div>

</div>
<!-- /.container-fluid -->
</div>
</div>
<?php $__currentLoopData = $vendor; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $vendors): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<!-- Modal -->
<div class="modal fade" id="exampleModal<?php echo e($vendors->vendor_id); ?>" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<h5 class="modal-title" id="exampleModalLabel"><?php echo e(__('messages.Delete')); ?></h5>
					<button type="button" class="close" data-dismiss="modal" aria-label="Close">
						<span aria-hidden="true">&times;</span>
					</button>
			</div>
			<div class="modal-body">
				<?php echo e(__('messages.Are you want to delete')); ?>

			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-secondary" data-dismiss="modal"><?php echo e(__('messages.Close')); ?></button>
				<a href="<?php echo e(route('delete-vendor', $vendors->vendor_id)); ?>" class="btn btn-primary"><?php echo e(__('messages.Delete')); ?></a>
			</div>
		</div>
	</div>
</div>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>   
<?php $__env->stopSection(); ?>
<?php echo $__env->make('cityadmin.layout.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>