I\'m trying to output a dynamic javascript file for inclusion from external websites with the [script src=\"\"] tag. As the view is using the Blade engine, it\'
[script src=\"\"]
In Laravel 5.6:
return response() ->view('embedded', ['foo' => $foo]) ->header('Content-Type', 'application/javascript');