@extends('admin.layouts.app') @section('title', 'Blog Posts') @section('page-title', 'Blog Posts') @section('content') {{-- Page Header with Actions --}}
Manage all your blog content and SEO settings
Total Posts
{{ $blogs->total() }}
Published
{{ \App\Models\Blog::where('is_published', true)->count() }}
Drafts
{{ \App\Models\Blog::where('is_published', false)->count() }}
| Post | Status | Author | Date | Actions |
|---|---|---|---|---|
|
{{-- Featured Image --}}
@if($blog->featured_image && file_exists(public_path('uploads/blogs/'.$blog->featured_image)))
{{ $blog->title }} /blog/{{ $blog->slug }} @if($blog->excerpt){{ Str::limit($blog->excerpt, 60) }} @endif |
{{-- Status --}}
@if($blog->is_published) Published @else Draft @endif | {{-- Author --}}
{{ strtoupper(substr($blog->author->name ?? 'A', 0, 1)) }}
{{ $blog->author->name ?? 'Unknown' }}
|
{{-- Date --}}
{{ $blog->created_at->format('M d, Y') }}
{{ $blog->created_at->format('h:i A') }}
|
{{-- Actions --}}