1. Go to this page and download the library: Download nexxai/laravel-rfc3161 library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nexxai / laravel-rfc3161 example snippets
use Nexxai\Rfc3161\Concerns\HasRfc3161Timestamps;
class User extends Authenticatable
{
use HasRfc3161Timestamps;
}
use Nexxai\Rfc3161\Models\Timestamp as TimestampRecord;
use Nexxai\Rfc3161\Facades\Timestamp as TimestampFacade;
$timestamp = TimestampRecord::timestampFile($filePath, $invoice);
$rawResponse = TimestampFacade::requestTimestamp($filePath);
use App\Models\Invoice;
use Nexxai\Rfc3161\Models\Timestamp;
use Nexxai\Rfc3161\Providers\DigiCert;
$invoice = Invoice::findOrFail(1);
// Creates a TSQ from file content, sends it to your configured default provider, and stores TSQ/TSR binary payloads.
$timestamp = Timestamp::timestampFile(
storage_path('app/invoices/invoice-2026-04.pdf'),
$invoice,
);
// You can choose a specific provider per request.
$timestamp = Timestamp::timestampFile(
storage_path('app/invoices/invoice-2026-04.pdf'),
$invoice,
new DigiCert(),
);
// Verify stored query and response with locally downloaded provider certificates.
$isValid = $timestamp->verify();
// You can also verify explicit query/response data.
$isValid = $timestamp->verify($customTsqBinary, $customTsrBinary);