I recently migrated to Laravel 5, and now CSRF check is on every post submission. I thought about removing it but I want to follow the best practices, so I\'ll keep it that
I think you can do something like this (not tested will update if I get a chance)
$(document).on('submit', 'form', function(e)
$(this).append(');
});
you actually might want to store token in a variable that you reupdate as it expires.
The benefit of appending it on submit is if you append elements via ajax I think it'll still work without having to add anything else.
EDIT: Here's a great article on using Rails UJS with Laravel (which includes this auto CRSF token functionality): https://medium.com/@barryvdh/unobtrusive-javascript-with-jquery-ujs-and-laravel-e05f444d3439