{{-- Flash Messages --}}
@if (session()->has('message'))
@if($showDraftList)
@endif
{{-- Form Section (toggle with Add More) --}}
@if($formMode)
@endif
{{-- View Section --}}
@if($viewMode && $cryptoToView)
@endif
{{-- Table Section --}}
{{-- Filters --}}
{{-- Table --}}
{{-- Pagination --}}
{{ session('message') }}
@endif
{{-- Add More Button --}}
@if(($role_id == 1) || in_array(23, $permissions))
@if(!$formMode && !$viewMode)
@endif
@endif
Import JSON
Draft List
@foreach(\App\Models\CryptoNewsDraft::latest()->get() as $draft)
@endforeach
{{ $draft->title ?? 'No Title' }}
{{ $draft->alias }}
{{ $draft->alias }}
{{ $updateMode ? 'Edit News' : 'Add News' }}
Crypto News Details
@include('livewire.admin.partials.crypto-news-view')
All News
| SR No. | Image | Title | Author | Uploaded At | Published At | News Type | SEO Check | Actions |
|---|---|---|---|---|---|---|---|---|
| {{ $cryptos->firstItem() + $index }} |
@if($crypto->image)
|
@php
$baseUrl = env('WEB_URL');
// Current time
$now = \Carbon\Carbon::now();
// Published time
$publishedAt = $crypto->published_at
? \Carbon\Carbon::parse($crypto->published_at)
: null;
// Preview condition
$isPreview = ($crypto->is_seo_check == 0)
|| ($publishedAt && $publishedAt->gt($now));
$preview = $isPreview ? '?preview=draft' : '';
// Final URL
$url = $baseUrl . '/' . $crypto->alias . $preview;
@endphp
{{ $crypto->postAuthor->dispaly_name ?? 'N/A' }} | {{ $crypto->created_at ? $crypto->created_at->format('d M Y h:i A') : 'N/A' }} | {{ $crypto->publishedAt ? \Carbon\Carbon::createFromTimestamp($crypto->publishedAt, 'Asia/Kolkata')->format('d M Y h:i A'): 'N/A'}} | @switch($crypto->is_gabbar) @case(1) News @break @case(2) Press Release @break @case(3) Sponsored @break @case(4) Guest News @break @case(5) Blog @break @case(6) Crypto News @break @default Draft @endswitch | @if($crypto->is_seo_check) Yes @else No @endif |
@if(($role_id == 1) || in_array(24, $permissions))
@endif
@if(($role_id == 1) || in_array(25, $permissions))
@endif
|
|
|
No records found |
||||||||
{{ $cryptos->links() }}