@include('Admin.Includes.header') @php use Illuminate\Support\Facades\Auth; use App\General\BlogClass; $logged_in_user = Auth::user(); @endphp

{{ __('Blog List') }}

@if (session('success')) @endif @if ($errors->any()) @endif
Advanced Filters
Reset

Total Blogs

{{ $blogs->count() }}

Published

{{ $blogs->where('active', 1)->count() }}

Draft

{{ $blogs->where('active', 0)->count() }}

Private

{{ $blogs->where('active', 2)->count() }}

Blogs Table
@php $i = 1; @endphp @foreach ($blogs as $blog) @endforeach
# Title Blog Categories Featured Blog Created By Status Created Date Actions
{{ $i++ }}
@if ($blog->cover_image) Cover @else
@endif
{{ Str::limit($blog->title, 40) }}
@if ($blog->description) {{ Str::limit(strip_tags($blog->description), 60) }} @endif
@if ($blog->blogCategories->count() > 0) @foreach ($blog->blogCategories->take(3) as $category) {{ $category->title }} @endforeach @if ($blog->blogCategories->count() > 3) +{{ $blog->blogCategories->count() - 3 }} @endif @else No categories @endif @php $statusClass = [ 0 => 'bg-warning-subtle text-warning', 1 => 'bg-success-subtle text-success', ]; $statusText = [ 0 => 'Not Featured', 1 => 'Featured', ]; @endphp {{ $statusText[$blog->is_featured] ?? 'Unknown' }}
{{ strtoupper(substr(Auth::user()->name ?? 'A', 0, 1)) }}
{{ Auth::user()->name ?? 'Admin' }}
@php $statusClass = [ 0 => 'bg-warning-subtle text-warning', 1 => 'bg-success-subtle text-success', 2 => 'bg-secondary-subtle text-secondary', ]; $statusText = [ 0 => 'Draft', 1 => 'Published', 2 => 'Private', ]; @endphp {{ $statusText[$blog->active] ?? 'Unknown' }}
{{ \Carbon\Carbon::parse($blog->created_at)->timezone('Australia/Sydney')->format('M d, Y') }}
{{ \Carbon\Carbon::parse($blog->created_at)->timezone('Australia/Sydney')->format('h:i A') }}