@extends('layouts.app') @section('title', 'API Token Details') @section('content')
API Token Details
Token Information
Name
{{ $apiToken->name }}
Client
{{ $apiToken->client->name }}
Status
@if($apiToken->is_revoked) Revoked @else Active @endif
Created
{{ $apiToken->created_at->format('Y-m-d H:i:s') }}
Last Used
{{ $apiToken->last_used_at ? $apiToken->last_used_at->format('Y-m-d H:i:s') : 'Never' }}
Token Value
Keep this token secure. It will not be shown again.
Usage Examples
cURL
curl -X GET "{{ url('/api/test') }}" \
    -H "Authorization: Bearer {{ $apiToken->token }}" \
    -H "Accept: application/json"
JavaScript
fetch('{{ url('/api/test') }}', {
    headers: {
        'Authorization': 'Bearer {{ $apiToken->token }}',
        'Accept': 'application/json'
    }
})
.then(response => response.json())
.then(data => console.log(data));
Actions
@if(!$apiToken->is_revoked)
@csrf
@endif
@csrf
Edit
@csrf @method('DELETE')
@push('scripts') @endpush @endsection