

<?php $__env->startSection('content'); ?>
    <div class="bg-white shadow rounded p-6">
        <div class="flex justify-between items-center mb-4">
            <h2 class="text-2xl font-bold">All Properties</h2>
            <a href="<?php echo e(route('properties.create')); ?>"
                class="flex items-center bg-blue-600 text-white px-4 py-2 rounded hover:bg-blue-700 transition shadow-md">
                <i class="fas fa-plus mr-2"></i> Add Property
            </a>
        </div>
        <table class="min-w-full divide-y divide-gray-200">
            <thead class="bg-gray-100">
                <tr>
                    <th class="px-6 py-3 text-left text-sm font-medium">ID</th>
                    <th class="px-6 py-3 text-left text-sm font-medium">Property Name</th>
                    <th class="px-6 py-3 text-left text-sm font-medium">Price</th>
                    <th class="px-6 py-3 text-left text-sm font-medium">Security Deposit</th>
                    <th class="px-6 py-3 text-left text-sm font-medium">Category</th>
                    <th class="px-6 py-3 text-left text-sm font-medium">Action</th>
                </tr>
            </thead>
            <tbody class="divide-y divide-gray-100">
                <?php $__empty_1 = true; $__currentLoopData = $properties; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $property): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); $__empty_1 = false; ?>
                    <tr>
                        <td class="px-6 py-4"><?php echo e($loop->iteration); ?></td>
                        <td class="px-6 py-4"><?php echo e($property->property_name); ?></td>
                        <td class="px-6 py-4"><?php echo e($property->price); ?></td>
                        <td class="px-6 py-4"><?php echo e($property->security_deposit); ?></td>
                        <td class="px-6 py-4"><?php echo e($property->category_name); ?></td>
                        <td class="px-6 py-4 flex space-x-2">
                            <!-- Edit -->
                            <a href="<?php echo e(route('properties.edit', $property->id)); ?>"
                               class="bg-yellow-500 hover:bg-yellow-600 text-white px-3 py-1 rounded text-sm shadow">
                                Edit
                            </a>

                            <!-- Delete -->
                            <form action="<?php echo e(route('properties.destroy', $property->id)); ?>" method="POST"
                                  onsubmit="return confirm('Are you sure you want to delete this property?');">
                                <?php echo csrf_field(); ?>
                                <?php echo method_field('DELETE'); ?>
                                <button type="submit"
                                        class="bg-red-600 hover:bg-red-700 text-white px-3 py-1 rounded text-sm shadow">
                                    Delete
                                </button>
                            </form>
                        </td>
                    </tr>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); if ($__empty_1): ?>
                    <tr>
                        <td colspan="5" class="px-6 py-4 text-center text-gray-500">No properties found.</td>
                    </tr>
                <?php endif; ?>
            </tbody>
        </table>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH E:\Sw_arif\New folder\realState\resources\views/backend/admin/properties/index.blade.php ENDPATH**/ ?>