@php $faviconPath = \App\Models\SystemSetting::get('favicon_path'); @endphp @if($faviconPath) @else @endif {{-- Dark Mode Script (before body renders to prevent flash) --}} {{-- Vite Assets --}} @vite(['resources/css/app.css', 'resources/js/app.js']) {{-- Highlight.js for code syntax --}} {{-- Scribe Try It Out --}} {{-- Mobile Sidebar Overlay --}}
{{-- Sidebar --}} {{-- Main Content --}}
{{-- Top Bar --}}
{{-- Mobile menu button --}}
{{-- Language Selector --}} {{-- Dark Mode Toggle --}} {{-- Back to Dashboard --}} Dashboard
{{-- Content --}}
{{-- Introduction --}}

{{ $metadata['title'] }}

{{ $metadata['description'] ?? '' }}

@if($intro)
{!! $intro !!}
@endif
{{-- Authentication --}}

Authenticating Requests

To authenticate requests, include an Authorization header with the value "Bearer {'{YOUR_API_TOKEN}'}".

All authenticated endpoints are marked with a requires authentication badge.

@if($auth['extra_info'] ?? false)

{!! $auth['extra_info'] !!}

@endif
{{-- Endpoint Groups --}} @foreach($groupedEndpoints as $group)

{{ $group['name'] }}

@if($group['description'] ?? false)

{{ $group['description'] }}

@endif {{-- Endpoints --}} @foreach($group['endpoints'] as $endpoint) @php $endpointId = $group['name'] . '-' . implode('', $endpoint->httpMethods) . str_replace(['/', '{', '}'], ['-', '-', '-'], $endpoint->uri); $endpointId = Str::slug($endpointId); $method = $endpoint->httpMethods[0]; $formId = implode('', $endpoint->httpMethods) . str_replace(['/', '{', '}', '-'], '', $endpoint->uri); @endphp
{{-- Endpoint Header --}}
{{ $method }} {{ $endpoint->uri }} @if($endpoint->metadata->authenticated ?? false) requires authentication @endif

{{ $endpoint->metadata->title ?? '' }}

{{-- Left: Description & Parameters --}}
@if($endpoint->metadata->description ?? false)

{{ $endpoint->metadata->description }}

@endif {{-- URL Parameters --}} @if(count($endpoint->urlParameters) > 0)

URL Parameters

@foreach($endpoint->urlParameters as $name => $param)
{{ $name }} {{ $param['type'] ?? 'string' }} @if($param['required'] ?? false) required @endif
@if($param['description'] ?? false)

{{ $param['description'] }}

@endif
@endforeach
@endif {{-- Query Parameters --}} @if(count($endpoint->queryParameters) > 0)

Query Parameters

@foreach($endpoint->queryParameters as $name => $param)
{{ $name }} {{ $param['type'] ?? 'string' }} @if($param['required'] ?? false) required @endif
@if($param['description'] ?? false)

{{ $param['description'] }}

@endif
@endforeach
@endif {{-- Body Parameters --}} @if(count($endpoint->bodyParameters) > 0)

Body Parameters

@foreach($endpoint->bodyParameters as $name => $param)
{{ $name }} {{ $param['type'] ?? 'string' }} @if($param['required'] ?? false) required @endif
@if($param['description'] ?? false)

{{ $param['description'] }}

@endif
@endforeach
@endif {{-- Response Examples --}} @if(count($endpoint->responses) > 0)

Response Examples

@foreach($endpoint->responses as $response)
{{ $response['status'] }} @if($response['description'] ?? false) {{ $response['description'] }} @endif
@if($response['content'] ?? false)
{{ is_string($response['content']) ? $response['content'] : json_encode(json_decode($response['content']), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) }}
@endif
@endforeach
@endif
{{-- Right: Code Examples & Try It Out --}}
{{-- Code Examples --}}

Example Request

{{-- Mobile Language Tabs --}}
{{-- Code Blocks --}}
curl --request {{ $method }} \
    --get "{{ $baseUrl }}/{{ $endpoint->uri }}" \
    --header "Authorization: Bearer {'{YOUR_API_TOKEN}'}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL("{{ $baseUrl }}/{{ $endpoint->uri }}");

const headers = {
    "Authorization": "Bearer {YOUR_API_TOKEN}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "{{ $method }}",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = '{{ $baseUrl }}/{{ $endpoint->uri }}';
$response = $client->{{ strtolower($method) }}(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_API_TOKEN}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
{{-- Try It Out --}} @if($tryItOut['enabled'] ?? false)

Try It Out

{{-- Auth Header --}} @if($endpoint->metadata->authenticated ?? false)
@endif {{-- URL Parameters --}} @foreach($endpoint->urlParameters as $name => $param)
@endforeach {{-- Query Parameters --}} @foreach($endpoint->queryParameters as $name => $param)
@endforeach {{-- Body Parameters --}} @foreach($endpoint->bodyParameters as $name => $param)
@if(($param['type'] ?? '') === 'object' || str_contains($param['type'] ?? '', 'array')) @else @endif
@endforeach {{-- Hidden headers --}} {{-- Buttons --}}
{{-- Response Display --}}
@endif
@endforeach
@endforeach {{-- Append Content --}} @if($append ?? false)
{!! $append !!}
@endif
{{-- Initialize --}}