Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/233.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在laravel 7中显示图片时出现问题_Php_Laravel - Fatal编程技术网

Php 在laravel 7中显示图片时出现问题

Php 在laravel 7中显示图片时出现问题,php,laravel,Php,Laravel,我正在处理Laravel7,我想显示管理员添加的图像,但它们不显示 这是index.blade.php: @foreach ($posts as $post) <div class="col-3"> <div class="product__item"> <div class="product__item__pic set-bg" data-setbg="{

我正在处理Laravel7,我想显示管理员添加的图像,但它们不显示

这是index.blade.php:

  @foreach ($posts as $post)
          <div class="col-3">
      <div class="product__item">
  <div class="product__item__pic set-bg" data-setbg="{{asset('product/September2020/'.$post->Photo)}}">
       </div>
    </div>
</div>
@endforeach
@foreach($posts as$post)
@endforeach
这是图片的地址:C:\wamp64\www\Projectclient\storage\app\public\product\September2020


感谢您的帮助

首先创建一个符号链接:

php artisan storage:link
然后,将在您的
public
文件夹中创建一个符号,其中包含
storage/app/public
。然后,您可以通过以下方式访问它:

{{ asset('storage/product/September2020/'.$post->Photo) }} 

你在.env文件中设置了APP_URL了吗?你能告诉我们
{{asset('product/September2020/'.$post->Photo)}
返回了什么吗?您可以在中看到
src=”“
source@sta非常感谢,这很有效