We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm try used grid with grid.js, when i'm click 'delete' button ajax try send request in my controller
class WebController extends Controller { public function destroy(Request $request) { echo 1; } }
in web.php
Route::delete("$name/delete", 'WebController@destroy')->name('destroy');
request sended, but i have 419 error
This is because ajax does not send _token data with request, must be
_grids.utils.handleAjaxRequest = function (element, event, options) { ... var data = isForm ? obj.serialize() : {}; data._token = $('meta[name="csrf-token"]').attr('content'); $.ajax({ method: isForm ? obj.attr('method') : obj.data('method') || 'POST', url: isForm ? obj.attr('action') : obj.attr('href'), data: data, beforeSend: function beforeSend() { ...
and in layout.blade.php
<meta name="csrf-token" content="{{ csrf_token() }}">
Also initialization grid.js must be
$(document).ready(function(){_grids.init()});
This prevents js running before HTML
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I'm try used grid with grid.js, when i'm click 'delete' button ajax try send request in my controller
in web.php
request sended, but i have 419 error
This is because ajax does not send _token data with request, must be
and in layout.blade.php
Also initialization grid.js must be
This prevents js running before HTML
The text was updated successfully, but these errors were encountered: