<?php if (isset($component)) { $__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da = $component; } ?>
<?php $component = $__env->getContainer()->make(App\View\Components\AppLayout::class, []); ?>
<?php $component->withName('app-layout'); ?>
<?php if ($component->shouldRender()): ?>
<?php $__env->startComponent($component->resolveView(), $component->data()); ?>
<?php $component->withAttributes([]); ?>
    <?php echo $__env->make('admin.include.sidebar', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <nav class="navbar navbar-expand-lg navbar-light bg-light">
        <div class="container-fluid">

            <button type="button" id="sidebarCollapse" class="btn btn-danger">
                <i class="fas fa-align-left"></i>
            </button>
            <button class="btn btn-dark d-inline-block d-lg-none ml-auto" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
                <i class="fas fa-align-justify"></i>
            </button>
            <?php if(session()->has('success')): ?>
                <div class="alert alert-success mb-0 alert-dismissible fade show" role="alert">
                   <?php echo e(session()->get('success')); ?>

                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <?php endif; ?>
                <?php if(session()->has('error')): ?>
                <div class="alert alert-danger mb-0 alert-dismissible fade show" role="alert">
                   <?php echo e(session()->get('error')); ?>

                    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <?php endif; ?>
             <a class="btn btn-danger" href='<?php echo e(route("cars.create")); ?>'>Add New Vehicle</a>

        </div>
    </nav>
        <!-- Page Content  -->
    <div class="wrapper">
        <!-- Sidebar  -->


        <!-- Page Content  -->
        <div id="content" style="padding: 20px 0;">
            <div class="navbar-expand-lg navbar-light bg-light">
                <table id="example" class="table table-striped table-bordered dark" style="width:100%">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Category</th>
                            <th>Brand</th>
                            <th>Name</th>
                            <th>Specification</th>
                            <th>Daily</th>
                            <th>Weekly</th>
                            <th>Status</th>
                            <th>Action</th>
                        </tr>
                    </thead>
                    <tbody>
                        <?php $__currentLoopData = $advertisement; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr>
                            <td><?php echo e($item->id); ?></td>
                            <td><?php echo e($item->categoryname); ?></td>
                            <td><?php echo e($item->modelname); ?></td>
                            <td>
                                <?php echo e($item->name); ?>

                                <br>
                                <?php echo e($item->distance); ?>

                                <br>
                                <?php echo e($item->gear); ?>

                            </td>
                            <td>
                                <span class="mr-2">Doors : </span><?php echo e($item->doors); ?>

                                <br>
                                <span class="mr-2">Luggage : </span><?php echo e($item->luggage); ?>

                                <br>
                                <span class="mr-2">Person : </span><?php echo e($item->person); ?>

                            </td>
                            <td><?php echo e($currency); ?> <?php echo e($item->price); ?></td>
                            <td><?php echo e($currency); ?> <?php echo e($item->fromyears); ?></td>
                            <td>
                                <form action="<?php echo e(route('cars.update',$item->id)); ?>" method="POST" enctype="multipart/form-data">
                                   <?php echo method_field('PATCH'); ?>
                                   <?php echo csrf_field(); ?>
                                   <input type="hidden" name="status" value="<?php echo e($item->status == 1 ? '0' : '1'); ?>">
                                   <input type="submit" value="<?php echo e($item->status == 1 ? 'Active' : 'Inactive'); ?>" class="<?php echo e($item->status == 1 ? 'btn btn-success' : 'btn btn-warning'); ?>">
                                </form>
                            </td>
                            <td class="action">
                                    <a class="btn btn-info" href="<?php echo e(route('cars.edit',$item->id)); ?>"><i class="fas fa-edit"></i></a>
                                
                                <form action="<?php echo e(route('cars.destroy', $item->id)); ?>" method="POST" style="display: contents;">
                                    <?php echo csrf_field(); ?>
                                    <?php echo method_field('delete'); ?>
                                <button type="submit" class="btn btn-warning" onclick="return condelete()"><i class="fas fa-trash"></i></button>
                                   </form>
                            </td>
                        </tr>
                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </tbody>
                </table>
            </div>


        </div>
    </div>

    <script type="text/javascript">
        function condelete()
        {
        var message=confirm("Do you really want to delete");
        if(message==true)
        {
        return true;
        }
        else
        {
        return false;
        }
        }
        bootbox.confirm("Are you sure?", function(result) {
          Example.show("Confirm result: "+result);
        });

      </script>
 <?php echo $__env->renderComponent(); ?>
<?php endif; ?>
<?php if (isset($__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da)): ?>
<?php $component = $__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da; ?>
<?php unset($__componentOriginal8e2ce59650f81721f93fef32250174d77c3531da); ?>
<?php endif; ?>
<?php /**PATH /home/isoftco/public_html/zedostar/resources/views/admin/car/index.blade.php ENDPATH**/ ?>