简体   繁体   中英

laravel display image in blade with echo function

i tired display image in blade with echo function like : echo "<img src='"{{ url('images/adult/'.$image.) }}'>";

give me syntax error, unexpected '<' (View:

You don't need to use echo in blade templates.

You can write html directly in the blade template and then use the double curly braces to inject your php.

So you'd be looking at something more like

<img src="{{ url('images/adult/' . $image) }}">

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM