Suppose this is a JS code and I want to print the value of id
. Here id is a variable with a value receiving into the jq function.
function follow_or_unfollow(id,action){
myUrl = "{{ action('FollowsController@show', 'id') }}" ;
}
If we mension 'id'
it will show the id string.
PS. here {{ is using as it meant as php code in blade template.
Now i need to print the script variable inside a php code.