Current File : //home/tradevaly/public_html/resources/views/backend/pages/news/subcat.blade.php |
@extends('backend.ayaan.master')
@push('title') $cat->name @endpush
@section('css')
<!-- DataTables -->
<link href="{{ asset('/assets/libs/datatables/datatables.min.css') }}" rel="stylesheet" type="text/css" />
@endsection
@section('content')
@component('components.breadcrumb')
@slot('li_1') Dashboards @endslot
@slot('title') $cat->name @endslot
@endcomponent
<div class="row">
<div class="col-12">
<div class="card">
<div class="card-body">
<div class="row mb-2">
<div class="col-sm-4"></div>
<div class="col-sm-8">
<div class="text-sm-end">
<a href="{{url('b2b/category/add')}}"
class="btn btn-success btn-rounded waves-effect waves-light mb-2 me-2"><i
class="mdi mdi-plus me-1"></i> Add New Category</a>
</div>
</div><!-- end col-->
</div>
<div class="table-responsive">
<table id="datatable-buttons" class="table table-bordered dt-responsive nowrap w-100">
<thead class="table-light">
<tr>
<th class="text-center">#</th>
<th>{{translate('Image')}}</th>
<th>{{translate('Name')}}</th>
<th>{{translate('Parent id')}}</th>
<th>{{translate('Sub Categories')}}</th>
<th>{{translate('Status')}}</th>
<th>{{translate('Actions')}}</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<!-- end row -->
@endsection
@section('script')
<!-- Required datatable js -->
<script src="{{ asset('/assets/libs/datatables/datatables.min.js') }}"></script>
<script src="{{ asset('/assets/libs/jszip/jszip.min.js') }}"></script>
<script src="{{ asset('/assets/libs/pdfmake/pdfmake.min.js') }}"></script>
<!-- Datatable init js -->
<script type="text/javascript">
$(function () {
$(document).ready(function () {
var table = $('#datatable-buttons').DataTable({
lengthChange: false,
processing: true,
dom: 'Bfrtip',
serverSide: true,
ajax: "{{ route('admin.category.subcat', $cat->id) }}",
columns: [
{data: 'DT_RowIndex', name: 'DT_RowIndex'},
{data: 'pic', name: 'pic'},
{data: 'name', name: 'name'},
{data: 'parent', name: 'parent'},
{data: 'subcat', name: 'subcat'},
{data: 'statuschange', name: 'statuschange'},
{
data: 'action',
name: 'action',
orderable: true,
searchable: true
},
],
buttons: ['copy', 'excel', 'pdf', 'colvis']
});
table.buttons().container().appendTo('#datatable-buttons_wrapper .col-md-6:eq(0)');
$(".dataTables_length select").addClass('form-select form-select-sm');
});
});
</script>
@endsection