お知らせがpinnedの場合ピン留めの表示をする (#58)

This commit is contained in:
Eai
2019-02-08 23:45:25 +09:00
committed by shibafu
parent 85e9599654
commit 7337f60491
4 changed files with 15 additions and 1 deletions

View File

@@ -31,6 +31,9 @@
<div class="list-group list-group-flush">
@foreach($informations as $info)
<a class="list-group-item" href="{{ route('info.show', ['id' => $info->id]) }}">
@if ($info->pinned)
<span class="badge badge-secondary"><span class="oi oi-pin"></span>ピン留め</span>
@endif
<span class="badge {{ $categories[$info->category]['class'] }}">{{ $categories[$info->category]['label'] }}</span> {{ $info->title }} <small class="text-secondary">- {{ $info->created_at->format('n月j日') }}</small>
</a>
@endforeach