jc-it/yii2-flysystem-asset-manager

使用flysystem的Yii2资产管理器

v2.0.0 2022-06-15 12:24 UTC

This package is auto-updated.

Last update: 2024-09-15 17:05:11 UTC


README

本扩展提供了一个使用flysystem的资产管理器。

安装

安装此扩展的首选方式是通过composer

运行以下命令之一:

$ composer require jc-it/yii2-flysystem-asset-manager

或者

"jc-it/yii2-flysystem-asset-manager": "^<latest version>"

将以下内容添加到您的composer.json文件的require部分:

配置

...
'components' => [
    'assetFilesystem' => function() {
        return new \League\Flysystem\Filesystem(new \League\Flysystem\Local\LocalFilesystemAdapter(\Yii::getAlias('@webroot/assets')));
    },
    'assetManager' => [
        'class' => \JCIT\components\AssetManager::class,
        'filesystem' => 'assetFilesystem',
    ],
],

待办事项

  • 添加测试

鸣谢