yuncms/yii2-attachment

This package is abandoned and no longer maintained. The author suggests using the yuncms/yuncms-attachment package instead.

Flexible attachment module for Yii

Installs: 10 320

Dependents: 1

Suggesters: 0

Security: 0

Stars: 2

Watchers: 0

Forks: 0

Open Issues: 1

Type:yii2-extension

2.0.3 2017-10-14 06:28 UTC

This package is auto-updated.

Last update: 2019-02-20 19:39:48 UTC


README

适用于YII2的附件管理模块,主要是附件的统一保存,获取,暂时未做入库保存部分。

Latest Stable Version Total Downloads Reference Status Build Status Dependency Status License

Installation

The preferred way to install this extension is through composer.

Either run

$ composer require yuncms/yii2-attachment

or add

"yuncms/yii2-attachment": "~2.0.0"

to the require section of your composer.json file.

##配置迁移

    'controllerMap' => [
        'migrate' => [
            'class' => 'yii\console\controllers\MigrateController',
			//自动应答
            'interactive' => 0,
			//命名空间
			'migrationNamespaces' => [
                'yuncms\attachment\migrations',
                //etc..
            ],
        ],
    ],
./yii migrate/up

##模块配置

#定义语言包配置
'components' => [
    'i18n' => [
        'translations' => [
            'attachment' => [
                'class' => 'yii\i18n\PhpMessageSource',
                'basePath' => '@yuncms/attachment/messages',
            ],
        ]
    ]
],
'modules' => [
    'attachment' => [
        'class' => 'yuncms\attachment\Module',
        //etc..
    ],
]

License

This is released under the MIT License. See the bundled LICENSE.md for details.