mardi 29 décembre 2015

Send parameter file_path to controller (laravel 5)

My Code is like this :

function showAjaxPdf(file_path)
        {
            var file_path = "test/test_one.pdf".replace(/\\/g,"/");
            alert(file_path);
            $.ajax({
                url: "news/test/" + file_path,
                success: function(response)
                {
                    alert(response);
                }
            });
        }

My function test in controller is like this :

public function getTest($file_path)
    {
        die($file_path);      
    }

The results of the response : test

Should the results of the response : test/test_one.pdf

How do I get the results of the response : test/test_one.pdf?

Thank you



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1Ow3ZAq
via IFTTT

Aucun commentaire:

Enregistrer un commentaire