无法在Laravel刀片文件中加载图像 [英] Can't load images in laravel blade files
本文介绍了无法在Laravel刀片文件中加载图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经从此处下载了模板.
我想设计laravel
刀片页面中的页面,将css
和js
文件放在公用文件夹中,然后将刀片文件链接到它们,然后就可以了.
I want to design pages like that in laravel
blade pages, I put css
and js
files in public folder and link blade files to them, and it works.
但是我无法处理图像,此模板中没有用于图像的文件夹,而且我不知道如何将其加载到刀片页面中.
But I can't handle images, there isn't a folder for images in this template and I don't know how to load them in my blade pages.
推荐答案
您可以在以下路径上上传图像
you can upload images on below path
storage/app/public/images
//this way you can use in your blade file
<img src = "{{ asset('/images/YOUR_IMAGE.png') }}" />
但是您需要运行一个命令
but you need to run one command
php artisan storage:link
它将创建从公共/存储到存储/应用/公共的符号链接
it will create a symlink from public/storage to storage/app/public
这篇关于无法在Laravel刀片文件中加载图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文