94 lines
3.1 KiB
PHP
94 lines
3.1 KiB
PHP
@extends('layouts.admin.admin')
|
|
|
|
@section('page-specific-styles')
|
|
<link rel="stylesheet" href="{{ asset('css/jquery.dataTables.min.css') }}">
|
|
<link rel="stylesheet" href="{{ asset('css/TableTools.min.css') }}"/>
|
|
<link rel="stylesheet" href="{{ asset('css/lightbox.css') }}"/>
|
|
@endsection
|
|
|
|
@section('title', 'Role')
|
|
|
|
@section('content')
|
|
|
|
<div class="nk-block-head">
|
|
<div class="nk-block-head-between flex-wrap gap g-2">
|
|
<div class="nk-block-head-content">
|
|
<h2 class="nk-block-title">Roles </h1>
|
|
<nav>
|
|
<ol class="breadcrumb breadcrumb-arrow mb-0">
|
|
<li class="breadcrumb-item"><a href="#">Home</a></li>
|
|
<li class="breadcrumb-item"><a href="#">Roles</a></li>
|
|
|
|
</ol>
|
|
</nav>
|
|
</div>
|
|
<div class="nk-block-head-content">
|
|
<ul class="d-flex">
|
|
<li><a href="{{ route('role.create') }}" class="btn btn-primary d-none d-md-inline-flex"><em class="icon ni ni-plus"></em><span>Add Role</span></a></li>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="nk-block">
|
|
<div class="card mt-3 mb-2">
|
|
<table class="datatable-init table" data-nk-container="table-responsive" id="example">
|
|
<thead class="table-light">
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>S.No.</th>
|
|
<th>Role Name</th>
|
|
<th>Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
@endsection
|
|
|
|
|
|
@section('page-specific-scripts')
|
|
<script src="{{ asset('js/datatables.min.js') }}"></script>
|
|
<script src="{{ asset('js/lightbox.js') }}"></script>
|
|
<script>
|
|
$(document).ready( function () {
|
|
$('#example').DataTable({
|
|
"processing": true,
|
|
"serverSide": true,
|
|
"ajax": '{{ route('role.data') }}',
|
|
// dom: 'Bfrtip',
|
|
// buttons: [
|
|
// 'copy', 'csv', 'excel', 'pdf', 'print',
|
|
// // exportOptions: {
|
|
// // columns: 'th:not(:last-child)'
|
|
// // }
|
|
// ],
|
|
dom: 'Bfrtip',
|
|
buttons: [
|
|
{
|
|
extend: 'excel',
|
|
text: 'Export Search Results',
|
|
className: 'btn btn-default',
|
|
exportOptions: {
|
|
columns: 'th:not(:last-child)'
|
|
}
|
|
}
|
|
],
|
|
"columns": [
|
|
{ "data": "id", 'visible': false },
|
|
{ "data": "DT_RowIndex", orderable: false, searchable: false },
|
|
{ "data": "name" },
|
|
{ "data": "actions", orderable: false, searchable: false },
|
|
],
|
|
order: [ [0, 'desc'] ]
|
|
});
|
|
} );
|
|
</script>
|
|
@endsection
|
|
|
|
|