如何从存储中访问直接图像?
How can I access a direct image from storage?
我将项目中的图像保存在 storage/images/clients/ 中,我如何检索这些图像并在视图中显示它们?
I'm saving the images from my project in storage/images/clients/ how do I retrieve those images and display them for the view?
您需要在 storage/images 和 public/images 之间创建符号链接:>
You need to create a symbolic link between the storage/images and public/images:
ln -s /full/path/to/storage/images /full/path/to/public/images
然后你就可以使用这些图片了:
Then you'll be able to use these images:
<img src="{{ asset('images/clients/john.jpg') }}">
这篇关于显示视图 Laravel 的文件夹图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
在 Laravel 集合对象中添加新元素add new element in laravel collection object(在 Laravel 集合对象中添加新元素)
在 Laravel 5 中创建编辑模式Creating an edit modal in Laravel 5(在 Laravel 5 中创建编辑模式)
用于集合的 Laravel 5.5 API 资源(独立数据)Laravel 5.5 API resources for collections (standalone data)(用于集合的 Laravel 5.5 API 资源(独立数据))
在 php Laravel 5 中创建自定义辅助函数的最佳实践What is the best practice to create a custom helper function in php Laravel 5?(在 php Laravel 5 中创建自定义辅助函数的最佳实践是什么
没有“Access-Control-Allow-Origin"标头 - LaravelNo #39;Access-Control-Allow-Origin#39; header - Laravel(没有“Access-Control-Allow-Origin标头 - Laravel)
Laravel Passport Route 重定向到登录页面Laravel Passport Route redirects to login page(Laravel Passport Route 重定向到登录页面)