@extends('layouts.default')
@section('title', 'API / Sistem Logları')
@section('content')
<div class="container-fluid">
    @include('admin.partials.page-header')
    <div class="card"><div class="card-body"><div class="table-responsive"><table class="table table-responsive-md"><thead><tr><th>Platform</th><th>Endpoint</th><th>Metod</th><th>Kod</th><th>Süre</th><th>Hata</th><th>Tarih</th></tr></thead><tbody>@forelse($logs as $log)<tr><td>{{ strtoupper($log->platform) }}</td><td>{{ $log->endpoint ?: '-' }}</td><td>{{ $log->method }}</td><td>{{ $log->status_code ?: '-' }}</td><td>{{ $log->duration_ms ? $log->duration_ms.' ms' : '-' }}</td><td>{{ $log->error_message ?: '-' }}</td><td>{{ $log->requested_at?->format('d.m.Y H:i') ?? $log->created_at?->format('d.m.Y H:i') }}</td></tr>@empty<tr><td colspan="7" class="text-center text-muted py-5">Henüz log yok.</td></tr>@endforelse</tbody></table></div>{{ $logs->links() }}</div></div>
</div>
@endsection
