Laravel ShareLink provides a comprehensive solution for generating and managing secure, temporary share links. Designed for seamless integration into Laravel applications, this package facilitates sharing of files, routes, and model previews while offering advanced features like time limitations and password protection.
Laravel ShareLink is an advanced package designed to facilitate the generation, management, and secure sharing of temporary links for files, routes, and model previews within Laravel applications. This powerful tool not only simplifies the sharing process but also enhances security and provides comprehensive auditing capabilities.
use Grazulex\ShareLink\Facades\ShareLink;
// Create a file share link with expiration and password
$link = ShareLink::create('/path/to/document.pdf')
->expiresIn(60) // 60 minutes expiration
->maxClicks(5)
->withPassword('secret123')
->generate();
echo $link->url; // Outputs the generated share link
// Share a local file
$link = ShareLink::create('/storage/documents/report.pdf')
->expiresIn(1440) // 24 hours expiration
->maxClicks(10)
->generate();
// Create a burn-after-reading link with IP restrictions
$link = ShareLink::create('/secure/document.pdf')
->expiresIn(60)
->burnAfterReading() // Self-destructs after first access
->metadata([
'allowed_ips' => ['192.168.1.0/24'],
'denied_ips' => ['192.168.1.100']
])
->generate();
For additional information, detailed usage instructions, and further resources, please refer to the Laravel ShareLink Wiki.
This package is optimized for performance and security, making it an essential tool for any Laravel developer looking to implement robust sharing features in their applications. With features such as rate limiting, password protection, and comprehensive auditing, Laravel ShareLink ensures a secure sharing experience tailored to the needs of modern applications.
No comments yet.
Sign in to be the first to comment.