AJAX: Can not get data into controller

Posted 8 months ago by vincej

This is for me a major mystery. I have tested everything.

The form data is coming through nicely. My route checks out perfectly. The success function works fine, however for some dumb reason on my part, for sure, my controller is not receiving the data. Many Thanks for your continued help !

Javascript / AJAX

$("#editsubmit").click(function () {
        var formData = $("#formData").serialize();
        var id = $("#reference").val();

            headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
            type: "POST",
            url: '/quote_edit/save_edit/' + id,
            data: {data:formData},
            success: function () {
                localStorage['alert'] = 'true';
                location.href = "/open_quotes"
            error: function () {
                alert('there has been a system level error - please contact support')

**My Controller: **

public function save_quote_edited(Request $request){
        dd($request);   // I have tried them individually, and None of these dd() work. 

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.