这是我在用户个人资料页面中使用的代码,效果很好
@foreach ($user->posts as $post)
<div class="col-4 mb-4">
<a href="{{ route('posts.show', ['post' => $post->id]) }}">
<img src="{{ asset('storage') . '/' . $post->image }}" class="w-100 h-100">
</a>
</div>
@endforeach
现在我想在主页上显示所有用户的帖子
怎么做 ?
慕标5832272
慕的地8271018
12345678_0001