1
$('#status').parent().append('<a href="' + data.output.url + '" id="link">Download file</a>');

How to print "data.output.url" variable in Laravel View.

4

1 Answer 1

0

You can use the curly braces like this in the blade template:

$('#status').parent().append('<a href="' + {{ $dataOutputUrl }} + '" id="link">Download file</a>');

...Where $dataOutputUrl a php variable passed to the template. The template gets parsed and the variable will get output into the javascript.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.