PHP code example of rezaf-dev / laravel-temp-link

1. Go to this page and download the library: Download rezaf-dev/laravel-temp-link 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/ */

    

rezaf-dev / laravel-temp-link example snippets


return [
    'temp_link_path' => '/temp',
    'disk' => 'public',
    'scheduler' => true,
];

user \RezafDev\LaravelTempLink\Facades;
echo TempLink::generateTempLink('path/to/private/file.txt', 3600); 
// http://127.0.0.1:8000/storage/16435/325/61f6430b18189.txt
bash
php artisan vendor:publish --tag="laravel-temp-link-config"

php artisan templink:delete