@extends('admin_base') @section('title', 'Blog Posts') @section('style') @endsection @section('content')

Blog Posts

@forelse($blogs as $blog) @empty @endforelse
Image Title Tags Stats Date Actions
{{ $blog->title }}
{{ $blog->title }}
By {{ $blog->author->first_name . ' ' . $blog->author->last_name }}
@php $maxTags = 4; $tagCount = is_array($blog->tags) ? count($blog->tags) : 0; @endphp @if($blog->tags && $tagCount) @foreach(array_slice($blog->tags, 0, $maxTags) as $tag) {{ $tag }} @endforeach @if($tagCount > $maxTags) +{{ $tagCount - $maxTags }} @endif @endif
{{ $blog->comments_count }} @foreach(App\Models\BlogReaction::REACTIONS as $type => $reaction) {{ $reaction['emoji'] }} {{ $blog->reactions()->where('reaction_type', $type)->count() }} @endforeach
{{ $blog->created_at->format('d M, Y h:i A') }}
{{ $blog->created_at->format('h:i A') }}
No blog posts found.
{{ $blogs->links('partial.pagination') }}
@endsection @section('script') @endsection