@if (count($posts) > 0) @foreach ($posts as $post) @php $postCategory = $post->getCategory(); @endphp
@endforeach @endif