<?php echo $__env->make('admin.includes.errors', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php $__env->startSection('content'); ?>
<div class="container">
<?php echo $__env->make('admin.posts.mylink', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<h2 class="text-center">Property List</h2>
<div class="card">
<div class="card-body">
<table class="table table-hover">
    <thead>
        <th>
            GalleryI
        </th>
        <th>
            Property Information
        </th>
        <th>
            Posted By
        </th>
        <th>
            Edit
        </th>
        <th>
            Delete
        </th>
    </thead>
    <tbody>
    <?php if($posts->count() > 0): ?>
    <?php $__currentLoopData = $posts; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $post): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
                <td>
                    <img src="<?php echo e($post->gallery_one); ?>" alt="<?php echo e($post->project_name); ?>" width="140px" height="180px">
                </td>
                <td>
                <p>Name: <?php echo e($post->title); ?><br/>
                    <p>City: <?php echo e($post->city); ?><br/>
                    <p>Price: ₹ <?php echo e($post->price); ?><br/>
                    <p>Created At: <?php echo e($post->created_at); ?><br/>
                    <p>Updated At: <?php echo e($post->updated_at); ?>

                </td>
                <td>
                <p>Name: <?php echo e($post->user->name); ?><br/>
                    <p>Email: <?php echo e($post->user->email); ?><br/>
                    <p>Contact: <?php echo e($post->user->contact); ?>

                </td>
                <td>
                <a href="<?php echo e(route('post.edit', ['id' =>$post->id])); ?>" class="btn btn-info">Edit</a>
                </td>
                <td>
                <a href="<?php echo e(route('post.delete', ['id' =>$post->id])); ?>" class="btn btn-danger">Trash</a>
                </td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        <?php else: ?>
        <tr>
            <th colspan="5" class="text-center">Property Not Listed.</th>
        </tr>
    <?php endif; ?> 
    </tbody>   
</table>
</div>
        <div>
            <?php echo e($posts->links()); ?>

        </div>
</div> 
</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>