i’m working on Laravel 7 , i want to display the images added by the administrator, but they don’t show up.
This is the index.blade.php :
JavaScript
x
@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
This is the adress of the pictures : C:wamp64wwwProjectclientstorageapppublicproductSeptember2020
Thanks fo help
Advertisement
Answer
First create a symbolic link :
JavaScript
php artisan storage:link
Then a symbolic will create on your public
folder with storage/app/public
. Then you can access it as :
JavaScript
{{ asset('storage/product/September2020/'.$post->Photo) }}