phpguus / laravel-raid-storage-driver
一个封装了 Flysystem RAID 驱动的 Laravel 存储驱动。
1.0.0
2019-09-17 13:17 UTC
Requires
- php: ^7.2
- illuminate/console: 5.8.*
- illuminate/support: 5.8.*
- phpguus/flysystem-raid: ^1.0
Requires (Dev)
- phpunit/phpunit: ^8.3
This package is auto-updated.
Last update: 2024-09-18 03:53:09 UTC
README
laravel-raid-storage-driver 为 Laravel 应用程序提供了对 flysystem-raid 包的封装。
安装
使用 composer 安装该包
composer require phpguus/laravel-raid-storage-driver
用法
在 config/filesystems.php
中,您现在可以创建一个具有 "raid" 驱动的磁盘(在 disks
子数组中)。
'redundantStorage' => [ 'driver' => 'raid', 'raidLevel' => 1, 'disks' => [ 'diskOne', 'diskTwo', 'diskThree' ]; ];
这允许您像这样简单使用磁盘
Storage::disk('redundantStorage')->write('myfile.txt', 'Something!');
... 或者如果您正在处理上传的文件
$file->store('', 'redundantStorage');
贡献
欢迎提交拉取请求。对于重大更改,请先提交一个问题以讨论您希望更改的内容。
请确保根据需要更新测试。