<x-layouts.app :title="'SERP Geçmişi — '.$keyword->phrase"><div class="container-fluid"><div class="row"><x-customer-sidebar/><main class="col-lg-10 p-4 p-lg-5"><div class="d-flex flex-wrap justify-content-between gap-3 mb-4"><div><h1 class="h2">SERP kontrol geçmişi</h1><a href="{{ route('projects.keywords.show',[$project,$keyword]) }}">{{ $keyword->phrase }}</a></div>@if($keyword->status===\App\Enums\KeywordStatus::Active)@if(config('serp.enabled'))<form method="POST" action="{{ route('projects.keywords.serp-checks.store',[$project,$keyword]) }}">@csrf<button class="btn btn-primary">Kontrol başlat</button></form>@else<span class="alert alert-secondary py-2 mb-0">SERP kontrol hizmeti henüz yapılandırılmamış.</span>@endif @endif</div>@error('serp')<div class="alert alert-warning">{{ $message }}</div>@enderror<div class="card border-0 shadow-sm"><div class="table-responsive"><table class="table mb-0"><thead><tr><th>Zaman</th><th>Hedef</th><th>Durum</th><th>Sonuç</th></tr></thead><tbody>@forelse($checks as $check)<tr><td><a href="{{ route('projects.keywords.serp-checks.show',[$project,$keyword,$check]) }}">{{ $check->created_at->format('d.m.Y H:i') }}</a></td><td>{{ $check->search_engine->label() }} · {{ $check->country_code }}/{{ $check->language_code }} · {{ $check->device->label() }}</td><td>{{ $check->status->label() }}</td><td>{{ $check->status===\App\Enums\SerpCheckStatus::Completed?$check->result_count:'—' }}</td></tr>@empty<tr><td colspan="4" class="text-center py-5 text-body-secondary">Henüz gerçek kontrol kaydı yok.</td></tr>@endforelse</tbody></table></div></div><div class="mt-4">{{ $checks->links() }}</div></main></div></div></x-layouts.app>