@extends('admin.layouts.main') @section('title', 'API Log #' . $apiLog->id) @section('menu', 'Logs') @section('content')
Log Details
ID{{ $apiLog->id }}
Service{{ ucfirst($apiLog->service) }}
Method{{ $apiLog->method }}
HTTP Status@if($apiLog->http_status){{ $apiLog->http_status }}@else - @endif
Response Time{{ $apiLog->response_time ? number_format($apiLog->response_time, 2) . 'ms' : '-' }}
Status{{ ucfirst($apiLog->status) }}
Date{{ $apiLog->created_at->format('M d, Y H:i:s') }}
@if($apiLog->error_message)
Error: {{ $apiLog->error_message }}
@endif Back to Logs
URL
{{ $apiLog->url }}
Request Data
@if($apiLog->request_data)
{{ json_encode($apiLog->request_data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}
@else

No request data

@endif
Response Body
@if($apiLog->response_body) @php $decoded = json_decode($apiLog->response_body); $displayBody = $decoded ? json_encode($decoded, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) : $apiLog->response_body; @endphp
{{ $displayBody }}
@else

No response body

@endif
@endsection