Laravel Blade HTML图像 [英] Laravel Blade html image

查看:402
本文介绍了Laravel Blade HTML图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的图像文件路径是public/img/logo.png
我的app.blade.php文件路径为resources/views/app.blade.php

My image file path is public/img/logo.png and
my app.blade.php file path is resources/views/app.blade.php

在我的app.blade.php文件中,我使用{{HTML::image('/img/stuvi-logo.png')}}
显示图像.
我不明白为什么找不到图片.
image()方法的根文件夹是什么?

Inside of my app.blade.php file I use {{HTML::image('/img/stuvi-logo.png')}}
to display an image.
I don't understand why this won't find the image.
What is the root folder of the image() method?

推荐答案

更改 /img/stuvi-logo.png img/stuvi-logo.png

{{ HTML::image('img/stuvi-logo.png', 'alt text', array('class' => 'css-class')) }}

哪个会生成以下HTML .

<img src="http://your.url/img/stuvi-logo.png" class="css-class" alt="alt text">

这篇关于Laravel Blade HTML图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆