Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

I am currently echoing some data from vue.js in laravel like so:

<a href="/beers/@{{ beer.id }}">
    <img src="@{{ beer.path }}" alt=""/>
</a>

It works but my console gives me the following error twice:

http://beerquest.dev/%7B%7B%20beer.path%20%7D%7D

Any other variables that I have printed out work fine because they are not within double quotes probably.

Funny enough everything seems to work fine though but I would like to get rid of the messy console messages. Does anybody know how to fix this?

share|improve this question
    
What is the path of your image? and can I see your routes? – aldrin27 Oct 6 '15 at 23:02
    
Well the actual path is: path: "/uploads/heineken.jpg" I found out the %7B means a brace so there is something wrong with the way I am using templating probably. – Stephan-v Oct 6 '15 at 23:40
    
Can i see your routes? – aldrin27 Oct 6 '15 at 23:43
up vote 1 down vote accepted

Try without @ sign

<a href="/beers/{{ beer.id }}">
    <img src="{{ beer.path }}" alt=""/>
</a>

@ symbol will be removed by Blade; however, {{ name }} expression will remain untouched by the Blade engine, allowing it to instead be rendered by your JavaScript framework.

http://laravel.com/docs/5.1/blade#displaying-data

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.