You can install the package via composer:
composer require iritesh377/laravel-local-temporary-url
You can publish the config file with:
php artisan vendor:publish --tag="local-temporary-url-config"
This is the contents of the published config file:
return [
'disk' => ['local'],
'middleware' => ['web', 'signed']
];
This package requires no configuration; simply install it and it's ready to use. However, if you wish to utilize a different local disk or add additional disks, configuration options are available. Multiple local disks can be configured using the disk
key.
By default, the package applies web
and signed
middleware on routes. Nevertheless, you have the flexibility to configure middleware(s) by using the middleware
key.
Temporary URLs can be generated using the same syntax as for the S3 disk.
Storage::disk('local')->temporaryUrl('file.txt', now()->addMinutes(5));
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
The MIT License (MIT). Please see License File for more information.