jeudi 28 février 2019

Laravel Ajax Request $request empty result

I have an ajax request method post like this on the view :

$.ajax({
                data: { test : 1337, _token: "" },
                type: "POST",
                url: '',
                success: function (res) {
                    console.log(res)
                },
            });

and here is my route code :

Route::post('backend/blog/get_image_by_parent_id', 'Backend\BlogController@get_image_by_parent_id')->name('get_image_by_parent_id');

here is my controller :

public function get_image_by_parent_id(Request $request)
    {
        echo json_encode($request);
    }

when i look in network tab it's show me like this :

Network tab debug result

Anyone can help me out ?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2BYkzH0
via IFTTT

Aucun commentaire:

Enregistrer un commentaire