@foreach($notices->where('is_pinned', 1) as $notice)
Pinned
{{ $notice->category }}
{{ \Carbon\Carbon::parse($notice->published_at)->format('d M, Y') }}
{{ $notice->title }}
{{ $notice->content }}
{{ $notice->target_audience }}
@if($notice->attachment)
@endif
@endforeach
@foreach($notices->where('is_pinned', 0) as $notice)
{{ $notice->category }}
{{ \Carbon\Carbon::parse($notice->published_at)->format('d M, Y') }}
{{ $notice->title }}
{{ $notice->content }}
{{ $notice->target_audience }}
@if($notice->attachment)
@endif
@endforeach
@if($notices->isEmpty())
@endif