Generate secure, temporary download links with expiry and max download limits.
composer require nicxon/temp-download-linksphp artisan vendor:publish --provider="Nicxon\\TempDownload\\TempDownloadServiceProvider" --tag="migrations"
php artisan vendor:publish --provider="Nicxon\\TempDownload\\TempDownloadServiceProvider" --tag="config"
php artisan migrateuse Nicxon\TempDownload\TempDownloadLinkService;
$service = app(TempDownloadLinkService::class);
$link = $service->make(
'/path/to/your/file.zip', // path to a file in your public folder
120, // expires in 2 hours
5 // allow max 5 downloads
);
echo $link;MIT © 2025 Robert Nicjoo, PT. Nicxon International Solutions