@extends('layouts.admin') @section('header') Blog Posts @endsection @section('content')

Blog Posts

Manage and organize your blog content

Create New Post

Total Posts

{{ $posts->total() ?? 0 }}

Published

{{ $posts->where('published_at', '!=', null)->count() ?? 0 }}

Drafts

{{ $posts->where('published_at', null)->count() ?? 0 }}

Featured

{{ $posts->where('is_featured', true)->count() ?? 0 }}

All Posts

@forelse ($posts as $post) @empty @endforelse
Post Category Author Status Date Actions
@if($post->image) {{ $post->title }} @else
@endif

{{ $post->title }}

{{ Str::limit($post->summary, 80) }}

@if($post->reading_time) {{ $post->reading_time }} min read @endif
{{ $post->category ?? 'Uncategorized' }}
{{ substr($post->author ?? 'Unknown', 0, 1) }}

{{ $post->author ?? 'Unknown Author' }}

@if ($post->published_at && $post->published_at <= now()) Published @else Draft @endif @if ($post->is_featured) Featured @endif
@if ($post->published_at)
{{ $post->published_at->format('M d, Y') }} {{ $post->published_at->format('g:i A') }}
@else Not published @endif
Edit @if($post->published_at && $post->published_at <= now()) View @endif
@csrf @method('DELETE')

No blog posts

Get started by creating your first blog post.

@if($posts->hasPages())
{{ $posts->links() }}
@endif @endsection