<?php $__env->startSection('title'); ?> <h5 class="m-0 font-weight-bold text-primary" style="float: left;">Domains List</h5> 

<a href="<?php echo e(route('DomainSale.create')); ?>" style="float: right;"><i class="fas fa-plus-circle"></i></a>
<?php $__env->stopSection(); ?>

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

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


<div class="col-lg-5">
	<form action="" method="get">
		<div class="input-group">
			<input type="text" name="domain" class="form-control" placeholder="Enter Domain Name">
		</div>
	</form>
</div>


<div class="table-responsive"> 

 	<br>
 	<table class="table">
 	 <thead>
 	  <tr>
 	    <th>Domain Name</th>
 	    <th>Price</th>
 	     <th>Old</th>
 	     <th>Status</th>
 	      <th>Details</th>
 	      <th>Action</th>
 	       </tr>
 	        </thead> 
 	        <tbody>
 	        <?php $__currentLoopData = $domains; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $domain): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>		
 	         <tr>
 	            <td ><?php echo e($domain->name); ?></td>
 	            <td ><?php echo e($domain->price); ?></td>
 	             <td ><?php echo e(Carbon\Carbon::parse($domain->registrar_date)->age); ?></td> 
                  <td>
                      <?php if($domain->status == 1): ?>
                        Available
                      <?php else: ?>
                        SOLD
                      <?php endif; ?>
                  </td>
 	             <td ><a href="<?php echo e(route('DomainSale.show' , $domain->id)); ?>"><i class="fas fa-list-ul"></i></a></td> 
 	            
  	             <td>
			
				  <form action="<?php echo e(route('DomainSale.destroy' , $domain->id)); ?>" method="post" id="form-<?php echo e($domain->id); ?>">
                        <?php echo e(csrf_field()); ?>

                        <?php echo e(method_field("DELETE")); ?>

                    </form>

                    <a href="<?php echo e(route('DomainSale.edit' , $domain->id)); ?>" ><i class="fas fa-edit"></i></a>

                    &nbsp;
                                   <a href=""
                       onclick="if(confirm('Are you sure to delete?')) {
                               event.preventDefault();
                               document.getElementById('form-<?php echo e($domain->id); ?>').submit();
                               }else{ event.preventDefault(); }"
                       ><i class="fas fa-trash-alt"></i></a>
   
 	             </td> 
 	            
 	         </tr>
 	         <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


 	                 </tbody> 
 	             </table> 

		
		<?php if(isset($_GET['domain']) and $_GET['domain'] != null): ?>
		<br>
		<br>
		<div class="container">
			<div class="row justify-content-center">
			<?php echo e($domains->appends(['domain'=>$_GET['domain']])->links()); ?>

		</div>
		</div>

		<br>
		<br>
		<br>
		
		<?php else: ?>
		<br>
		<br>
		<div class="container">
			<div class="row justify-content-center">
			<?php echo e($domains->links()); ?>

		</div>
		</div>

		<br>
		<br>
		<br>

		<?php endif; ?>
 	          

 	         </div> 


<?php $__env->stopSection(); ?>
<?php echo $__env->make('Admin.master_page', array_diff_key(get_defined_vars(), ['__data' => 1, '__path' => 1]))->render(); ?><?php /**PATH /home/leaparyanict/aict.leap.aryanict.com/resources/views/Admin/DomainSale/index.blade.php ENDPATH**/ ?>