<?php $__env->startSection('content'); ?>
<div class="container-fluid mt-1">
	<div class="row">
	    <div class="col-sm-12">
	        <h3>
	            <i class="fa fa-list-ul"></i>
	            List of Police Station Names
	            <?php if (app('Illuminate\Contracts\Auth\Access\Gate')->check('ticket_admin-access')): ?>
		            <a href="<?php echo e(url('police-station/create')); ?>" class="btn btn-outline-primary pull-right">
		                <i class="fa fa-plus"></i> Create <b>Police Station Name</b>
		            </a>
	            <?php endif; ?>
	        </h3>
	        <div class="card bg-dark text-white">
	            <div class="card-header">
	                <h3 class="text-center"><i class="fa fa-list-ul"></i> List of <code><b>Police Station Names</b></code></h3>
	            </div>
	            <div class="card-body">
	            	<div class="table-responsive">
		                <table id="myTable" class="table table-striped table-bordered table-hover">
		                    <thead>
		                        <tr class="success">
		                            <th>SL</th>
		                            <th>Police Station Name</th>
		                            <th>District Name</th>
		                            <th>Division Name</th>
		                            <?php if (app('Illuminate\Contracts\Auth\Access\Gate')->check('ticket_admin-access')): ?>
		                            	<th>Edit</th>
		                            <?php endif; ?>
		                        </tr>
		                    </thead>
		                    <tbody>
		                    <?php
		                        $i = 0;
		                    ?>
		                    <?php foreach($policeStations as $policeStation): ?>
		                        <tr>
		                            <td><?php echo e(++$i); ?></td>
		                            <td><?php echo e($policeStation->name); ?></td>
		                            <td><?php echo e($policeStation->district->name); ?></td>
		                            <td><?php echo e($policeStation->division->name); ?></td>
		                            <?php if (app('Illuminate\Contracts\Auth\Access\Gate')->check('ticket_admin-access')): ?>
		                            	<td><?php echo Html::link("police-station/$policeStation->id/edit",' Edit', ['class' => 'fa fa-edit btn btn-outline-success btn-xs text-white']); ?></td>
	                            	<?php endif; ?>
		                        </tr>
		                    <?php endforeach; ?>
		                    </tbody>
		                </table>
		            </div>
	            </div>
	        </div>
	    </div>
	</div>
</div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('style'); ?>
    <link rel="stylesheet" href="<?php echo e(asset('assets/css/dataTables.bootstrap.min.css')); ?>">
<?php $__env->stopSection(); ?>

<?php $__env->startSection('script'); ?>
	<script src="<?php echo e(asset('assets/js/jquery.dataTables.min.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/js/dataTables.bootstrap.min.js')); ?>"></script>

	<script type="text/javascript">
	    $(document).ready(function(){
	        $('#myTable').DataTable();
	    });
	</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>