roblesterjr04 / disky
Disky is a simple package of plugins for Laravel Flysystem. But right now it just allows copying from one disk to another.
v0.1.1
2017-09-19 15:04 UTC
Requires
- php: ~5.6|~7.0
- illuminate/support: ~5.1
- league/flysystem: ~1.0
Requires (Dev)
- phpunit/phpunit: >=5.4.3
- squizlabs/php_codesniffer: ^2.3
This package is auto-updated.
Last update: 2024-10-27 04:14:19 UTC
README
Disky gives you an easy way to copy a file from one disk to another in one line of code.
Install
Via Composer
$ composer require roblesterjr04/disky
Add Service Provider to config/app.php
roblesterjr04\disky\DiskyServiceProvider::class,
Usage
Storage::copyToDisk('path/to/file', 's3'); // Same as copying from disk('local'); Storage::disk('s3')->copyToDisk('path/to/file', 'ftp'); Storage::disk('ftp')->copyToDisk('path/to/file', 'local'); // Use the same logic to copy a directory Storage::disk('ftp')->copyToDisk('path/to/directory', 's3');
Multiple Files are supported!
Storage::copyToDisk(['path/to/file1','path/to/file2'], 's3'); // You can copy to multiple disks! Storage::copyToDisk(['path/to/file1','path/to/file2'], ['s3','ftp']); // You can specify one or more folder destinations on the destination drive(s) Storage::copyToDisk('path/to/file', 's3', 'destination/path'); Storage::copyToDisk('path/to/file', 'ftp', ['destination/path1', 'destination/path2']);
Change log
Please see CHANGELOG for more information on what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email :author_email instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.