@php $post = $post ?? null; $category = $category ?? ($post ? $post->firstCategory : null); @endphp @if ($category)

{{ $category->name }} {{ $post ? ' - ' . $post->created_at->format('d M Y') : null }}

@endif