Skip to content

Latest commit

 

History

History
62 lines (39 loc) · 1.74 KB

README.md

File metadata and controls

62 lines (39 loc) · 1.74 KB

Logo

Installation

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']
];

Usage

Configuration

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.

Generate Temporary URL

Temporary URLs can be generated using the same syntax as for the S3 disk.

Storage::disk('local')->temporaryUrl('file.txt', now()->addMinutes(5));

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.