File: /var/www/html/orbidirectory.com/resources/views/admin/vehicles/index.blade.php
@extends('adminlte::page')
@section('title', 'ORBI Dashboard')
@section('content_header')
<h1>Vehicles</h1>
{{-- <small>Manage Vehicles</small> --}}
@stop
@section('content')
<div class="card card-dark">
<div class="card-header">
<h3 class="card-title"></h3>
<div class="card-tools">
<a href="{{ route('vehicle.create') }}" class="btn btn-dark"><i class="fas fa-plus"></i> Add Vehicles
</a>
</div>
</div>
<div class="card-body">
{{-- @if (session('success'))
<h6 class = 'alert alert-success'>
{{ Session('success') }}
</h6>
@endif --}}
<form method="POST" id="search-form" role="form">
{{-- <div class="form-group">
<label for="search">Search</label>
<x-adminlte-input class="form-control" id="search_keyword" name="search_keyword"
placeholder="Enter Description" />
</div> --}}
@php
$config = [
'showDropdowns' => true,
'cancelButtonClasses' => 'btn-danger',
'locale' => ['format' => 'YYYY/MM/DD'],
];
@endphp
</form>
<table class="table table-bordered vehicle-datatable">
<thead>
<tr>
<th>Transporter Name</th>
<th>Brand Name</th>
<th>Model Name</th>
<th>Vehicle Type</th>
<th>Transmission Type</th>
<th>Seating Capacity</th>
<th>Service Type</th>
<th>Status</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
@stop
@section('js')
<script type="text/javascript">
$(function() {
var dataTable = $('.vehicle-datatable').DataTable({
processing: true,
serverSide: true,
pageLength: 10,
// searching: true,
'ajax': {
'url': "{{ route('vehicle.index') }}",
'data': function(data) {
}
},
columns: [
{
data: 'transporter_name',
name: 'transporter_name'
},
{
data: 'make_id',
name: 'make_id'
},
{
data: 'model_id',
name: 'model_id',
},
{
data: 'vehicle_type_id',
name: 'vehicle_type_id',
},
{
data: 'transmission_type',
name: 'transmission_type',
},
{
data: 'seating_capacity',
name: 'seating_capacity',
},
{
data: 'service_type',
name: 'service_type',
},
{
data: 'status',
name: 'status',
},
{
data: 'action',
name: 'action',
orderable: false,
searchable: false
},
]
});
// $('#search_keyword').keyup(function() {
// dataTable.draw();
// });
});
</script>
@stop