{{ $blog->created_at->format('M d, Y') }}
@php
$totalReactions = collect(App\Models\BlogReaction::REACTIONS)
->map(function($reaction, $type) use ($blog) {
return $blog->reactions()->where('reaction_type', $type)->count();
})->sum();
@endphp
👍
{{ $totalReactions }}
{{ $blog->comments->count() }}
{{ $blog->title }}
@if($blog->tags)
@foreach(array_slice($blog->tags, 0, 3) as $tag)
#{{ $tag }}
@endforeach
@if(count($blog->tags) > 3)
+{{ count($blog->tags) - 3 }}
@endif
@endif