48 lines
2.0 KiB
PHP
48 lines
2.0 KiB
PHP
|
@section('meta_title', __('Access Tokens'))
|
||
|
@section('h1', __('Access Tokens'))
|
||
|
<x-layout.site>
|
||
|
<a href="{{ route('profile.access-tokens.create') }}" class="button button__create margin-bottom-20">{{ __('site.Create an access token') }}</a>
|
||
|
<div class="block-table">
|
||
|
<table class="table">
|
||
|
<tr>
|
||
|
<th>{{ __('validation.attributes.name') }}</th>
|
||
|
<th>{{ __('validation.attributes.permissions') }}</th>
|
||
|
<th>{{ __('Last Used') }}</th>
|
||
|
<th>{{ __('Created') }}</th>
|
||
|
<th></th>
|
||
|
</tr>
|
||
|
@foreach($tokens as $token)
|
||
|
<tr>
|
||
|
<td>
|
||
|
<a href="{{ route('profile.access-tokens.edit', $token) }}">{{ $token->name }}</a>
|
||
|
</td>
|
||
|
<td>
|
||
|
@foreach($token->abilities as $ability)
|
||
|
{{ \App\Enums\AccessTokenPermission::tryFrom($ability)?->getTitle() }}<br>
|
||
|
@endforeach
|
||
|
</td>
|
||
|
<td>
|
||
|
{{ $token->last_used_at?->diffForHumans() ?? __('Never') }}
|
||
|
</td>
|
||
|
<td>
|
||
|
{{ $token->created_at->diffForHumans() }}
|
||
|
</td>
|
||
|
<td>
|
||
|
<form method="post" action="{{ route('profile.access-tokens.destroy', $token) }}">
|
||
|
@csrf
|
||
|
@method('DELETE')
|
||
|
<button type="submit" class="button button-red click-confirm">
|
||
|
{{ __('Delete') }}
|
||
|
</button>
|
||
|
</form>
|
||
|
</td>
|
||
|
</tr>
|
||
|
@endforeach
|
||
|
</table>
|
||
|
</div>
|
||
|
{{ $tokens->links() }}
|
||
|
@push('scripts')
|
||
|
@include('_scripts._click-confirm', ['alert' => __('Do you want to delete?')])
|
||
|
@endpush
|
||
|
</x-layout.site>
|