fixing csrf issue for datagrid delete

This commit is contained in:
Prashant Singh 2019-04-08 20:26:04 +05:30
parent 2df1a84191
commit d8d645eb41
2 changed files with 4 additions and 4 deletions

View File

@ -41,7 +41,7 @@
@if ($enableActions)
<td class="actions" style="width: 100px;" data-value=" {{ __('ui::app.datagrid.actions') }}">
<div class="action">
@foreach ($actions as $action)
{{-- @foreach ($actions as $action)
<a
@if ($action['method'] == 'GET')
href="{{ route($action['route'], $record->{$index}) }}"
@ -56,7 +56,7 @@
data-token="{{ csrf_token() }}">
<span class="{{ $action['icon'] }}"></span>
</a>
@endforeach
@endforeach --}}
</div>
</td>
@endif

View File

@ -704,8 +704,8 @@
var element = e.currentTarget;
axios.post(element.getAttribute('data-action'), {
_token : element.getAttribute('data-token'),
method : element.getAttribute('data-method')
// _token : element.getAttribute('data-token'),
// method : element.getAttribute('data-method')
}).then(function(response) {
this.result = response;
console.log(this.result);