Add (publish date): Change to datetime, show on view, save publishdate properly
add (composer): rss feed
This commit is contained in:
@@ -42,32 +42,38 @@
|
||||
<td><img width="80" height="60" src="{{ $post->featured_image }}"
|
||||
class="img-fluid rounded-2" alt=""></td>
|
||||
<td>
|
||||
@if($post->status === 'publish')
|
||||
<span class="badge bg-success">{{ ucfirst($post->status) }}</span>
|
||||
@elseif($post->status === 'future')
|
||||
<span class="badge bg-primary">{{ ucfirst($post->status) }}</span>
|
||||
@elseif($post->status === 'draft')
|
||||
<span class="badge bg-secondary">{{ ucfirst($post->status) }}</span>
|
||||
@elseif($post->status === 'private')
|
||||
<span class="badge bg-info">{{ ucfirst($post->status) }}</span>
|
||||
@elseif ($post->status == 'trash')
|
||||
<span class="badge bg-danger">{{ ucfirst($post->status) }}</span>
|
||||
@else
|
||||
<span class="badge bg-secondary">{{ ucfirst($post->status) }}</span>
|
||||
@endif
|
||||
@if ($post->status === 'publish')
|
||||
<span class="badge bg-success">{{ ucfirst($post->status) }}</span>
|
||||
@elseif($post->status === 'future')
|
||||
<span class="badge bg-primary">{{ ucfirst($post->status) }}</span>
|
||||
@elseif($post->status === 'draft')
|
||||
<span class="badge bg-secondary">{{ ucfirst($post->status) }}</span>
|
||||
@elseif($post->status === 'private')
|
||||
<span class="badge bg-info">{{ ucfirst($post->status) }}</span>
|
||||
@elseif ($post->status == 'trash')
|
||||
<span class="badge bg-danger">{{ ucfirst($post->status) }}</span>
|
||||
@else
|
||||
<span class="badge bg-secondary">{{ ucfirst($post->status) }}</span>
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
@if(!is_empty($post->post_category?->category?->country_locale_slug) && $post->status == 'publish')
|
||||
<a
|
||||
href="{{ route('home.country.post', ['country' => $post->post_category?->category?->country_locale_slug, 'post_slug' => $post->slug]) }}">{{ $post->title }}</a>
|
||||
@if (!is_empty($post->post_category?->category?->country_locale_slug) && $post->status == 'publish')
|
||||
<a
|
||||
href="{{ route('home.country.post', ['country' => $post->post_category?->category?->country_locale_slug, 'post_slug' => $post->slug]) }}">{{ $post->title }}</a>
|
||||
@else
|
||||
{{ $post->title }}
|
||||
{{ $post->title }}
|
||||
@endif
|
||||
|
||||
</td>
|
||||
<td>
|
||||
Created at {{ $post->created_at->timezone(session()->get('timezone'))->isoFormat('Do MMMM YYYY, h:mm A') }}<br>
|
||||
Updated {{ $post->updated_at->diffForhumans() }}
|
||||
Created at
|
||||
{{ $post->created_at->timezone(session()->get('timezone'))->isoFormat('Do MMMM YYYY, h:mm A') }}<br>
|
||||
Updated {{ $post->updated_at->diffForhumans() }}<br>
|
||||
|
||||
@if ($post->status == 'publish')
|
||||
Published at
|
||||
{{ $post->publish_date->timezone(session()->get('timezone'))->isoFormat('Do MMMM YYYY, h:mm A') }}
|
||||
@endif
|
||||
</td>
|
||||
<td>
|
||||
<div><a href="{{ route('posts.manage.edit', ['post_id' => $post->id]) }}"
|
||||
|
||||
@@ -5,23 +5,23 @@
|
||||
<!-- Page title -->
|
||||
<div class="page-header d-print-none">
|
||||
<h2 class="page-title text-center justify-content-center">
|
||||
<div class="align-self-center">
|
||||
@if (!is_null($post))
|
||||
Edit Post
|
||||
@else
|
||||
New Post
|
||||
@endif
|
||||
</div>
|
||||
<div class="align-self-center">
|
||||
@if (!is_null($post))
|
||||
Edit Post
|
||||
@else
|
||||
New Post
|
||||
@endif
|
||||
</div>
|
||||
</h2>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-body">
|
||||
<div class="container-xl">
|
||||
@if (!is_null($post))
|
||||
<post-editor :post-id="{{ $post->id }}"></post-editor>
|
||||
@else
|
||||
<post-editor></post-editor>
|
||||
@endif
|
||||
@if (!is_null($post))
|
||||
<post-editor :post-id="{{ $post->id }}"></post-editor>
|
||||
@else
|
||||
<post-editor timezone="{{ session()->get('timezone') }}"></post-editor>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user