@extends('layouts.app') @section('content')
Auth Tokens
@can('create auth tokens') @endcan

@if(session('success')) @endif @if(session('generated_token')) @endif @if($authTokens->count() > 0) @foreach($authTokens as $token) @php $isExpired = $token->expiry < now(); $isActive = !$token->used && !$isExpired; @endphp @endforeach
# Token User Action Status Expiry Created At Actions
{{ $loop->iteration }} {{ substr($token->token, 0, 20) }}...
Hashed token
@if($token->user) {{ $token->user->name }} @else System @endif {{ $actions[$token->action] ?? $token->action }} @if($token->used) Used @elseif($isExpired) Expired @else Active @endif {{ $token->expiry->format('d M Y, h:i A') }} @if($isExpired)
Expired {{ $token->expiry->diffForHumans() }} @else
Expires in {{ $token->expiry->diffForHumans() }} @endif
{{ $token->created_at->format('d M Y') }}
@can('view auth tokens') @endcan @can('update auth tokens') @endcan @can('delete auth tokens')
@csrf @method('DELETE')
@endcan @if(!$token->used && !$isExpired) @endif
@else
No auth tokens found. @can('create auth tokens') Create your first auth token @endcan
@endif
@can('create auth tokens') @endcan @endsection @push('script') @endpush