承接 zantknight/yii2-gallery4 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

  1. Migrate to create gallery table by calling this command
    php yii migrate --migrationPath=@vendor/zantknight/yii2-gallery4/migrations
    
  2. Update config/web.php
    return [
        ...
        'modules' => [
            'gallery4' => [
                 'class' => 'zantknight\yii\gallery\Module',
             ],
        ]
    ]
  3. 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
                 ]
             ];
         }
     }
  4. 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
  5. Put this chunk in params.php
     return [
         ...
         'bsVersion' => '4.x',
     ];
  6. Create folder "media" in your "web" folder
  7. You will get something like this alt text alt text alt text alt text
  8. For image administration, go to Module Gallery4 Url (/gallery4/admin) and you will get something like this alt text

统计信息

  • 总下载量: 445
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-03-14

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固