fixing csrf issue for datagrid delete
This commit is contained in:
parent
2df1a84191
commit
d8d645eb41
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue