mrterryh said:
Try
Hi mrterryh,
Would I just add "images/mypath" insde the braces to get it to work?
Thanks!
There is also an HTML helper for images...
{{ HTML::image('images/mypath'.$article->image) }}
http://laravel.com/api/source-class-Illuminate.Html.HtmlBuilder.html#98-111
That did the trick! Thanks AndrewBNZ and mrterryh :)
Just to clarify the way that the blade syntax works:
{{ $article->image }}
is just a replacement for:
<?php echo $article->image; ?>
therefore you don't need to include the echo part if you are outputting HTML; that's part of what blade does for you. For example in your example you would do the following:
<img src="/images/mypath/{{ $article->image }}">
which is translated to
<img src="/images/mypath/<?php echo $article->image; ?>">
behind the scenes.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community