Sindbad~EG File Manager
<?php $__env->startSection('title', 'Service dan Layanan'); ?>
<?php $__env->startSection('breadcrumbs', 'Overview Service dan Layanan'); ?>
<?php $__env->startSection('css'); ?>
<style>
.underline:hover{
text-decoration: underline;
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-body">
<div class="mb-5 text-right">
<a href="<?php echo e(route('destinations.create')); ?>" class="btn btn-sm btn-success"> <i class="fa fa-plus"></i> Create</a>
</div>
<div class="row mb-3">
<div class="col-sm-7">
<ul class="nav nav-tabs ">
<li class="nav-item">
<a class="nav-link p-2 px-3 <?php echo e(Request::get('status') == NULL ? 'active' : ''); ?>" href="<?php echo e(route('destinations.index')); ?>">All</a>
</li>
<li class="nav-item">
<a class="nav-link p-2 px-3 <?php echo e(Request::get('status') == 'publish' ?'active' : ''); ?>" href="<?php echo e(route('destinations.index', ['status' =>'publish'])); ?>">Publish</a>
</li>
<li class="nav-item">
<a class="nav-link p-2 px-3 <?php echo e(Request::get('status') == 'draft' ?'active' : ''); ?>" href="<?php echo e(route('destinations.index', ['status' =>'draft'])); ?>">Draft</a>
</li>
</ul>
</div>
<div class="col-sm-5">
<form action="<?php echo e(route('destinations.index')); ?>">
<div class="input-group">
<input name="keyword" type="text" value="<?php echo e(Request::get('keyword')); ?>" class="form-control" placeholder="Filter by title">
<div class="input-group-append">
<input type="submit" value="Filter" class="btn btn-info">
</div>
</div>
</form>
</div>
</div>
<?php if(session('success')): ?>
<div class="alert alert-success alert-dismissible fade show" role="alert">
<?php echo e(session('success')); ?>.
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>
</div>
<?php endif; ?>
<table class="table">
<thead class="text-light" style="background-color:#33b751 !important">
<tr>
<th width="160px">Image</th>
<th class="">Service dan Layanan</th>
<th width="150px"></th>
<th width="88px">Action</th>
</tr>
</thead>
<tbody>
<?php $__currentLoopData = $destinations; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $index => $destination): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<tr>
<td align="left">
<?php if($destination->image): ?>
<img src="<?php echo e(asset('destinations_image/'.$destination->image)); ?>" alt="" width="120px">
<?php endif; ?>
</td>
<td>
<a href="<?php echo e(route('destinations.edit', [$destination->id])); ?>" style="color:#00838f;" class="underline">
<span class="d-block"><?php echo e($destination->title); ?></span>
</a>
</td>
<td class="text-right pr-4">
<?php if($destination->status=='DRAFT'): ?>
<span class="font-italic text-danger">Draft</span>
<?php endif; ?>
</td>
<td>
<a href="<?php echo e(route('destinations.edit', [$destination->id])); ?>" class="bnt btn-sm btn-warning text-light" title="Edit"><i class="fa fa-pencil"></i></a>
<button class="btn btn-sm btn-danger" onclick="deleteConfirm('<?php echo e($destination->id); ?>', '<?php echo e($destination->title); ?>')" data-target="#modalDelete" data-toggle="modal"><i class="fa fa-trash"></i></button>
</td>
</tr>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
</tbody>
<tfoot>
<?php echo e($destinations->appends(Request::all())->links()); ?>
</tfoot>
</table>
</div>
</div>
</div>
</div>
<!-- Modal Delete -->
<div class="modal fade" id="modalDelete" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title d-inline">Delete</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body" id="message">
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button>
<form action="" id="url" method="POST" class="d-inline">
<?php echo csrf_field(); ?>
<?php echo method_field('DELETE'); ?>
<button type="submit" class="btn btn-danger">Delete</button>
</form>
</div>
</div>
</div>
</div>
<!-- End Modal Delete -->
<?php $__env->stopSection(); ?>
<?php $__env->startSection('script'); ?>
<script>
function deleteConfirm(id, name){
var url = '<?php echo e(route("destinations.destroy", ":id")); ?>';
url = url.replace(':id', id);
document.getElementById("url").setAttribute("action", url);
document.getElementById('message').innerHTML ="Are you sure want to delete destination <b>"+name+"</b> ?"
$('#modalDelete').modal();
}
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH C:\xampp\htdocs\Company-Profile-Laravel\resources\views/Destinations/index.blade.php ENDPATH**/ ?>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists