Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

LovelyBoy's avatar

Simple Ajax Request

i am using Bootstrap 3 file Input with ajax. Here is the link http://plugins.krajee.com/file-input-ajax-demo/1

How when i send request to My given controller i got en error of TokenMismatchException yes because of its not laravel ajax type. My code

$("#input-701").fileinput({
        uploadUrl: '{{ Url::To("/profile/ajax") }}', // server upload action
        uploadAsync: true,
        maxFileCount: 1,
        allowedFileExtensions: ["jpg", "gif", "png"]
});
Now how can i send verif token with this request ?
0 likes
2 replies

Please or to participate in this conversation.