@include('livewire.admin.seodashboards.tab')
{{-- Filters --}}
{{-- Table --}}
{{-- Dynamic labels — show the actual date window being used. When end_date is set: relative to that date. When no filter: relative to today. --}} @php $baseUrl = 'https://cryptohindinews.in/'; $categoryMap = [ 'ICOs' => ['crypto-ico', true, 'users'], 'SEO' => ['/', true, 'users'], 'Author' => ['', true, 'author_models'], 'News' => ['', true, 'author_models'], ]; $isGrouped = in_array(request('data_type'), ['category', 'author']); @endphp @forelse($gscData as $i => $row) @php $authorTable = 'author_models'; if (str_starts_with($row->data_slug, 'default-slug')) { $url = rtrim($baseUrl, '/') . '/' . trim($row->category_type, '/'); } elseif ($row->data_slug == '/') { $url = rtrim($baseUrl, '/'); } elseif (isset($categoryMap[$row->category_type])) { [$prefix, $useSlug, $authorTable] = $categoryMap[$row->category_type]; $prefixPart = trim($prefix, '/'); $slugPart = $useSlug ? trim($row->data_slug, '/') : ''; $url = rtrim($baseUrl, '/') . ($prefixPart ? '/' . $prefixPart : '') . ($slugPart ? '/' . $slugPart : ''); } else { $url = rtrim($baseUrl, '/') . '/' . ltrim($row->data_slug, '/'); // ✅ FIX } @endphp @empty @endforelse
# Date Author team Slug Category Focus Keyword 1D {{ $windowLabels['1d'] }} 7D {{ $windowLabels['7d'] }} 28D {{ $windowLabels['28d'] }} Ranked(YES/NO)
{{ ($gscData->currentPage() - 1) * $gscData->perPage() + $i + 1 }} {{ $row->last_seen ? \Carbon\Carbon::parse($row->last_seen)->format('d M Y') : '—' }} {{ $row->author_name }} {{ $row->author_type }} @if ($isGrouped) @else {{ $row->data_slug }} @endif {{ $row->category_type ?? '—' }} @if(!empty($row->focus_keyword)) {{ $row->focus_keyword }} @else not set @endif {{ number_format($row->traffic_1d) }} {{ number_format($row->traffic_7d) }} {{ number_format($row->traffic_28d) }} @if ($row->focus_keyword) @if ($row->is_ranking) Ranking @else Not Ranking @endif @else @endif
No records found.
{{-- Pagination --}} @if($gscData->hasPages()) @endif