Update (post detail): Fix category display error

This commit is contained in:
2023-10-04 23:09:32 +08:00
parent f1b82f00b2
commit f1f02bb7b6

View File

@@ -1,6 +1,6 @@
<div class="row g-0 border rounded overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative">
<div class="col p-4 d-flex flex-column position-static">
@if(isset($category))
@if((isset($category)) && ($category->id != $post->category->id))
<span class="d-inline-block mb-2 text-success-emphasis"><i>Under</i> <strong class="ms-1">{{ $category->name }} <i class="bi bi-chevron-right small"></i> {{ $post->category->name }}</strong></span>
@else
<span class="d-inline-block mb-2 text-success-emphasis"><i>Under</i> <strong class="ms-1">{{ $post->category->name }}</strong></span>