revoked_at === null) { $share->update(['revoked_at' => now()]); } Flux::modals()->close(); Flux::toast(variant: 'success', text: __('Share revoked. The link no longer works.')); } public function delete(int $shareId): void { Share::findOrFail($shareId)->delete(); Flux::modals()->close(); Flux::toast(variant: 'success', text: __('Share deleted.')); } /** * @return LengthAwarePaginator */ #[Computed] public function shares(): LengthAwarePaginator { return Share::query() ->with('certificates') ->latest() ->paginate(10); } }; ?>
{{ __('Shares') }} {{ __('Secure pages you have shared with external recipients.') }}
@if ($this->shares->isEmpty()) {{ __('No shares yet') }} {{ __('Select certificates on the Certificates page and choose Share to create a secure page.') }} {{ __('Go to certificates') }} @else
{{ __('Certificates') }} {{ __('Recipient') }} {{ __('Expires') }} {{ __('Opened') }} {{ __('Status') }} @foreach ($this->shares as $share) {{ $share->certificates->pluck('title')->join(', ') ?: '—' }} {{ $share->recipient_email ?? '—' }} {{ $share->expires_at->format('M j, Y H:i') }} {{ trans_choice(':count time|:count times', $share->access_count, ['count' => $share->access_count]) }} @if ($share->revoked_at !== null) {{ __('Revoked') }} @elseif ($share->expires_at->isPast()) {{ __('Expired') }} @else {{ __('Active') }} @endif {{ __('Link & password') }} {{ __('Open page') }} @if ($share->isActive()) {{ __('Revoke') }} @endif {{ __('Delete') }}
{{ __('Share details') }} {{ __('Send the link and the password through different channels.') }}
@if ($share->password !== null) @else {{ __('This share is not password protected.') }} @endif @if ($share->last_accessed_at !== null) {{ __('Last opened :date.', ['date' => $share->last_accessed_at->translatedFormat('F j, Y H:i')]) }} @endif
{{ __('Done') }}
{{ __('Revoke share?') }} {{ __('The link stops working immediately. The recipient will no longer be able to view or download the certificates.') }}
{{ __('Cancel') }} {{ __('Revoke') }}
{{ __('Delete share?') }} {{ __('The link stops working and the share disappears from this list. The certificates themselves are not deleted.') }}
{{ __('Cancel') }} {{ __('Delete') }}
@endforeach
@endif