Commit 8fb82d98 authored by Viral Solani's avatar Viral Solani

- resolve datatable error

parent 2de3c975
...@@ -36,7 +36,7 @@ class RoleTableController extends Controller ...@@ -36,7 +36,7 @@ class RoleTableController extends Controller
->escapeColumns(['name', 'sort']) ->escapeColumns(['name', 'sort'])
->addColumn('permissions', function ($role) { ->addColumn('permissions', function ($role) {
if ($role->all) { if ($role->all) {
return '<span class="label label-success">'.trans('labels.general.all').'</span>'; return '<span class="label label-success">' . trans('labels.general.all') . '</span>';
} }
return $role->permission_name; return $role->permission_name;
......
...@@ -27,7 +27,6 @@ class ManageRoleRequest extends Request ...@@ -27,7 +27,6 @@ class ManageRoleRequest extends Request
public function rules() public function rules()
{ {
return [ return [
//
]; ];
} }
} }
...@@ -68,6 +68,12 @@ ...@@ -68,6 +68,12 @@
<script> <script>
$(function() { $(function() {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
var dataTable = $('#permissions-table').dataTable({ var dataTable = $('#permissions-table').dataTable({
processing: true, processing: true,
serverSide: true, serverSide: true,
......
...@@ -70,12 +70,19 @@ ...@@ -70,12 +70,19 @@
<script> <script>
$(function() { $(function() {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
var dataTable = $('#roles-table').dataTable({ var dataTable = $('#roles-table').dataTable({
processing: true, processing: true,
serverSide: true, serverSide: true,
ajax: { ajax: {
url: '{{ route("admin.access.role.get") }}', url: '{{ route("admin.access.role.get") }}',
type: 'post' type: 'post',
}, },
columns: [ columns: [
{data: 'name', name: '{{config('access.roles_table')}}.name'}, {data: 'name', name: '{{config('access.roles_table')}}.name'},
......
...@@ -65,6 +65,11 @@ ...@@ -65,6 +65,11 @@
{{ Html::script(mix('js/dataTable.js')) }} {{ Html::script(mix('js/dataTable.js')) }}
<script> <script>
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
$(function() { $(function() {
var dataTable = $('#blogcategories-table').dataTable({ var dataTable = $('#blogcategories-table').dataTable({
processing: true, processing: true,
......
...@@ -68,6 +68,12 @@ ...@@ -68,6 +68,12 @@
<script> <script>
$(function() { $(function() {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
var dataTable = $('#blogs-table').dataTable({ var dataTable = $('#blogs-table').dataTable({
processing: true, processing: true,
serverSide: true, serverSide: true,
......
...@@ -66,6 +66,12 @@ ...@@ -66,6 +66,12 @@
<script> <script>
$(function() { $(function() {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
var dataTable = $('#blogtags-table').dataTable({ var dataTable = $('#blogtags-table').dataTable({
processing: true, processing: true,
serverSide: true, serverSide: true,
......
...@@ -70,6 +70,12 @@ ...@@ -70,6 +70,12 @@
<script> <script>
$(function() { $(function() {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
var dataTable = $('#faqs-table').dataTable({ var dataTable = $('#faqs-table').dataTable({
processing: true, processing: true,
serverSide: true, serverSide: true,
......
...@@ -67,6 +67,13 @@ ...@@ -67,6 +67,13 @@
<script> <script>
$(function() { $(function() {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
var dataTable = $('#menus-table').dataTable({ var dataTable = $('#menus-table').dataTable({
processing: true, processing: true,
serverSide: true, serverSide: true,
......
...@@ -66,6 +66,12 @@ ...@@ -66,6 +66,12 @@
<script> <script>
$(function() { $(function() {
$.ajaxSetup({
headers: {
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
}
});
var dataTable = $('#pages-table').dataTable({ var dataTable = $('#pages-table').dataTable({
processing: true, processing: true,
serverSide: true, serverSide: true,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment