I am using laravel 5. I am construction a attachments list using jquery.
my file path is /files/myfile.jpg
$('#attachmentList').empty();
$.each(response, function(key, val) {
$('<li><a href="{{ asset('+val.filepath+val.filename+') }}">'
+val.filename+'</a></li>').appendTo('#attachmentList');
});
this creates %7B%7B%asset(files/myfile.jpg)%20%7D%7D url in my address bar.
I need asset url in the hyperlink. How can I make hyperlink in my view.
URL::assethelper in the controller from where you are sending these file paths. It would be best to post the controller code to which you are making your AJAX call.