1 year ago

How To Add Variable Data To Javascript

Posted 1 year ago by chrisgrim


I am trying to add laravel data to javascript.

Here is my javascript

function myFunction() {"");

I am trying to add the data $brand->url to the javascript but if I try

function myFunction() {"{{$brand->url}}");

I get http://sitename.test/%7B%7B$brand-%3Eurl%7D%7D


Please sign in or create an account to participate in this conversation.