Laravel:从存储文件夹中显示图像的问题
我在查看图像中有一个问题,这是存储文件夹的图像,以下是代码:
->editColumn('image_path', function ($submission) {
$imgUrl = asset('storage' . str_replace('public', '', $submission->image_path));
return "<img src=\"{$imgUrl}\" alt=\"Gambar Barang\" width=\"250\" />";
})
我尝试了 php手工艺品存储:link 它说链接已经存在,上次是图像正在显示,但是在删除了项目文件夹并粘贴了一个新图像后,图像没有显示。
I'm having a problem viewing image fron the storage folder, here are the codes:
->editColumn('image_path', function ($submission) {
$imgUrl = asset('storage' . str_replace('public', '', $submission->image_path));
return "<img src=\"{$imgUrl}\" alt=\"Gambar Barang\" width=\"250\" />";
})
I tried php artisan storage:link it says the link already exists, last time the image was showing but after i deleted my project folder and pasted a new one the images doesn't showing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Laravel生成该存储链接的缓存版本。
步骤1
删除root Directory上的public文件夹在root Directory上创建的存储文件夹
step 2
然后执行这些
命令终端的输出应为
Laravel generate cache version of that storage link..
Step 1
Delete the storage folder created by storage link command inside a public folder on your root directory
Step 2
Then execute these commands
The output on terminal should be