我在一个视图中有一个包含数据列表和数据详细信息的视图。我试图展示他们两个,但我不知道如何。你可以看到下面的代码
<div class="container">
<div id="theSidebar" class="sidebar"></div>
<div id="theGrid" class="main">
<section class="grid">
<!-- /posts -->
@foreach ($posts as $post)
<a class="grid__item" href="#">
<h2 class="title title--preview">{{$post->title}}</h2>
<span class="category">{{$post->title}}</span>
<div class="loader"></div>
<div class="meta meta--preview">
<img class="meta__avatar" src="{{ Voyager::image( $post->image ) }}" alt="{{$post->title}}" />
<span class="meta__date"><i class="fa fa-calendar-o"></i>{{$post->created_at->format('m-d-Y')}}</span>
<span class="meta__reading-time"><i class="fa fa-clock-o"></i>{{$post->created_at->format('H-i')}}</span>
</div>
</a>
@endforeach
<!-- /end post -->
</section>
<!-- /post content -->
<section class="content">
<div class="scroll-wrap">
<article class="content__item">
<span class="category category--full">{{$post->title}}</span>
<h2 class="title title--full">{{$post->title}}</h2>
<div class="meta meta--full">
<img class="meta__avatar" src="{{ Voyager::image( $post->image ) }}" alt="{{$post->title}}" />
<span class="meta__author">{{$post->title}}</span>
<span class="meta__date"><i class="fa fa-calendar-o"></i>{{$post->created_at}}</span>
<span class="meta__reading-time"><i class="fa fa-clock-o"></i>{{$post->created_at->format('m/d/Y')}}</span>
</div>
</article>
</div>
<button class="close-button"><i class="fa fa-close"></i><span>Close</span></button>
</section>
<!-- /end post content-->
</div>
</div><!-- /container -->
我的问题是如何在“帖子内容部分”中显示帖子详细信息。我是否必须再次执行一些循环才能获取数据?谢谢