This package use Laravel file storage system to save the signed URLs, https://laravel.com/docs/8.x/filesystem.
composer require waiyanhein/lumen-signed-url
$signedUrl = URLSigner::sign("http://testing.com", Carbon::now()->addMinutes(10)->format('Y-m-d H:i:s'));
- Note: the date must be in
Y-m-d H:i:s
format.
If your URL has parameters you can pass them as the third parameter as array.
$signedUrl = URLSigner::sign("http://testing.com", Carbon::now()->addMinutes(10)->format('Y-m-d H:i:s'), [ 'first_name' = 'Wai', 'last_name' => 'Hein' ]);
$isValid = URLSigner::validate($signedUrl);