@php use Illuminate\Support\Str; $locale = $locale ?? app()->getLocale(); $direction = $direction ?? (in_array($locale, ['ar', 'fa', 'ur']) ? 'rtl' : 'ltr'); $isRtl = $direction === 'rtl'; $fontFamily = $fontFamily ?? 'Inter'; $logoUrl = $logoUrl ?? null; $moduleVersion = $moduleVersion ?? '1.0.0'; $googleFontFamily = str_replace(' ', '+', $fontFamily); @endphp {{ __('applicationintegration-docs::doc.api_docs') }} | REST API
@if($logoUrl) Logo @else
API
@endif
{{ __('applicationintegration-docs::doc.api_docs') }} v{{ $moduleVersion }}
⌘K
@if($isPublic)

{{ __('applicationintegration-docs::doc.public_banner') }}

@endif
@foreach($sections as $section)

{{ $section['title'] }}

{{ $section['description'] }}

@if(!empty($section['quick'] ?? []))
@foreach($section['quick'] as $item)
{{ $item['label'] }}
{{ $item['value'] }}
@endforeach
@endif @if(!empty($section['endpoints'] ?? [])) @foreach($section['endpoints'] as $endpoint)
{{ $endpoint['method'] }} {{ $endpoint['path'] }} @if(!empty($endpoint['auth'])) 🔒 {{ __('applicationintegration-docs::doc.auth_required') }} @endif

{{ $endpoint['name'] }}

{{ $endpoint['summary'] }}

@if(!empty($endpoint['headers'] ?? [])) @foreach($endpoint['headers'] as $header) @endforeach
{{ __('applicationintegration-docs::doc.header') }} {{ __('applicationintegration-docs::doc.value') }}
{{ $header['name'] }} {{ $header['value'] }}
@endif @if(isset($endpoint['body']))
📥 {{ __('applicationintegration-docs::doc.body_schema') }}
{!! json_encode($endpoint['body'], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE) !!}
@endif @if(!empty($endpoint['notes'] ?? []))
💡 Notes
@foreach($endpoint['notes'] as $note)
{{ $note }}
@endforeach
@endif @include('applicationintegration::documentation.partials.code', [ 'method' => $endpoint['method'], 'path' => $endpoint['path'], 'body' => $endpoint['body'] ?? null, 'response' => $endpoint['response'] ?? [], 'baseUrl' => $baseUrl ])
@endforeach @endif @if(!empty($section['samples'] ?? []))
@include('applicationintegration::documentation.partials.code', [ 'method' => $section['samples']['method'], 'path' => $section['samples']['path'], 'body' => $section['samples']['body'], 'response' => $section['samples']['response'], 'baseUrl' => $baseUrl ])
@endif
@endforeach