ilhamarrouf/slim-filesystem
Composer 安装命令:
composer require ilhamarrouf/slim-filesystem
包简介
Slim Framework FileSystem abstraction layer library
README 文档
README
A simple filesystem for PHP slim framework like Laravel Storage.
Getting Started
Slim Filesystem can be installed with Composer.
With Composer
If you're already using Composer, just add ilhamarrouf/slim-filesystem to your composer.json file.
Slim Filesystem works with Composer's autoloader out of the bat.
{ "require": { "ilhamarrouf/slim-filesystem": "0.1.0" } }
Or
composer require ilhamarrouf/slim-filesystem
Usage
Basic example usage package on Slim 3.x
$settings = [ 'settings' => [ 'filesystem' => [ 'default' => 'cloud', 'cloud' => 'minio', 'disks' => [ 'public' => [ 'driver' => 'local', 'root' => __DIR__.'/storage/', 'url' => $_SERVER['HTTP_HOST'].'/storage', 'visibility' => 'public', ], 's3' => [ 'driver' => 's3', 'key' => 'superkey', 'secret' => 'supersecret', 'region' => 'us-east-1', 'bucket' => 'test', 'url' => 'http://host-to-aws-s3', ], 'minio' => [ 'driver' => 's3', 'endpoint' => '127.0.0.1:9000', 'use_path_style_endpoint' => true, 'key' => 'superpersonalket', 'secret' => 'superpersonalsecret', 'region' => 'us-east-1', 'bucket' => 'tms', ], ] ], ], ]; $app = new \Slim\App($settings); $container = $app->getContainer(); $container['storage'] = function ($container) { return new \Ilhamarrouf\Filesystem\FilesystemManager($container); };
统计信息
- 总下载量: 429
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-09-12