【发布时间】:2021-11-20 12:00:18
【问题描述】:
我有这个想法。可以上传,但是不显示。还有什么要补充的吗?
<div class="col-md-4">
<img class="img img-fluid img-thumbnail" src="/storage/profile_images/{{$profile->profile_image}}"/> </div>
这是我的show.blade.php 文件
<div class="col-md-4">
<img class="img img-fluid img-thumbnail" src="/storage/profile_images/{{$profile->profile_image}}"/></div>
这是player.blade.php 文件:
@if(count($players) > 0)
<?php $index = 0; ?>
@foreach($players as $player)
<div class="col-md-4">
<div class="card mb-1" style="width:300px">
<div class="card-body">
<img class="img img-fluid img-thumbnail" style="height: 170px; width: 350px" src="/storage/profile_images/{{$player->profile_image}}">
</div>
<div class="card-footer">
<div class="row justify-content-center">
<a href="/playerprofiles/{{$player->id}}" class="h5">{{$names[$index]}}</a><br>
</div>
<div class="row">
<div class="col-10">
<span class="h6">Team: {{$player->current_fc}}</span><br>
<span class="h6">Position: {{$player->position}}</span><br>
</div>
</div>
</div>
</div>
</div>
<?php $index++; ?>
@endforeach
<div class="col-12 mt-3">
{{$players->appends(request()->input())->links()}}
</div>
@else
<p>No Players available</p>
@endif
【问题讨论】:
-
您是否已将存储链接到公用文件夹?
php artisan storage:link? -
是的,它告诉我公用文件夹已经存在
-
img 元素的 src attr 中的 url 是什么? (在元素检查器中)尝试在浏览器中打开图像