zantknight/yii2-gallery4
最新稳定版本:v1.1.1
Composer 安装命令:
composer require zantknight/yii2-gallery4
包简介
Gallery manager for bootstrap4
关键字:
README 文档
README
Gallery manager for bootstrap4
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist zantknight/yii2-gallery4 "*"
or add
"zantknight/yii2-gallery4": "*"
to the require section of your composer.json file.
Usage
- Migrate to create gallery table by calling this command
php yii migrate --migrationPath=@vendor/zantknight/yii2-gallery4/migrations - Update config/web.php
return [ ... 'modules' => [ 'gallery4' => [ 'class' => 'zantknight\yii\gallery\Module', ], ] ]
- Add this behavior to your model
... use zantknight\yii\gallery\Gallery4Behavior; class YourModel extends \yii\db\ActiveRecord { ... public function behaviors() { return [ ... [ 'class' => Gallery4Behavior::className(), 'model' => $this ] ]; } }
- Put this onto your view
<?= \zantknight\yii\gallery\Gallery4Widget::widget([ 'ownerModel' => $model, 'multiple' => true ]); ?>
Description- ownerModel Model class where is used by view
- multiple Multiple upload status
- Put this chunk in params.php
return [ ... 'bsVersion' => '4.x', ];
- Create folder "media" in your "web" folder
- You will get something like this
- For image administration, go to Module Gallery4 Url (/gallery4/admin) and you will get something like this
统计信息
- 总下载量: 445
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-03-14