@extends('layouts.admin') @section('title', __('Blog')) @section('page-title', __('Blog')) @section('content')
| {{ __('Title') }} | {{ __('Slug') }} | {{ __('Status') }} | {{ __('When') }} | {{ __('Actions') }} |
|---|---|---|---|---|
| @if($post->status === 'publish' && $post->published_at && $post->published_at->lessThanOrEqualTo(now())) {{ $post->title }} @else {{ $post->title }} @endif | {{ $post->slug }} | @php $statusColors = [ 'publish' => 'bg-green-100 text-green-800', 'draft' => 'bg-gray-100 text-gray-800', 'schedule' => 'bg-yellow-100 text-yellow-800', ]; $statusLabel = [ 'publish' => __('Published'), 'draft' => __('Draft'), 'schedule' => __('Scheduled'), ]; @endphp {{ $statusLabel[$post->status] ?? ucfirst((string) $post->status) }} | @if($post->status === 'schedule') {{ $post->scheduled_at ? $post->scheduled_at->format('M d, Y H:i') : '—' }} @else {{ $post->published_at ? $post->published_at->format('M d, Y') : '—' }} @endif |
@if($post->status === 'publish' && $post->published_at && $post->published_at->lessThanOrEqualTo(now()))
|
| {{ __('No posts found.') }} | ||||