{{ __('Blog List') }}
{{ session('success') }}
@endif
@if ($errors->any())
-
@foreach ($errors->all() as $error)
- {{ $error }} @endforeach
Advanced Filters
Total Blogs
{{ $blogs->count() }}
Published
{{ $blogs->where('active', 1)->count() }}
Draft
{{ $blogs->where('active', 0)->count() }}
Private
{{ $blogs->where('active', 2)->count() }}
Blogs Table
| # | Title | Blog Categories | Featured Blog | Created By | Status | Created Date | Actions |
|---|---|---|---|---|---|---|---|
| {{ $i++ }} |
@if ($blog->cover_image)
{{ 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)) }}
|
@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') }} |
|