定制 prowebcraft/yii2-double-model 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

prowebcraft/yii2-double-model

最新稳定版本:0.1.4

Composer 安装命令:

composer require prowebcraft/yii2-double-model

包简介

Yii2 - Gii Double Model Generator

README 文档

README

This generator generates two ActiveRecord class for the specified database table. An empty one you can extend and a Base one which is the same as the original model generatior.

Installation

The preferred way to install this extension is through composer.

Either run

$ php composer.phar require --dev "prowebcraft/yii2-double-model": "dev-master"

or add

"prowebcraft/yii2-double-model": "dev-master"

to the require section of your composer.json file.

Usage

By Default Extension comes with Bootstrap file. Just install it. If you need manual installation, follow these steps:

//if your gii modules configuration looks like below:
    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = 'yii\gii\Module';

//remove this two lines
//Add this into common/config/main-local.php
    'bootstrap' => 'gii',
    'modules' => [
        'gii' => [
            'class' => 'yii\gii\Module',
            'generators' => [
                'doubleModel' => [
                    'class' => 'prowebcraft\yii2doublemodel\generators\model\Generator',
                    'strictReturnTypes' => true,
                ],
                'kartik-crud' => [
                    'class'     => 'prowebcraft\yii2doublemodel\generators\kcrud\Generator',
                ],
            ],
        ],
    ],

Remove strictReturnTypes option if you don't need strict return types

Open URL https://YOUR-YII2-INSTANCE/gii/doubleModel in browser and follow instructions

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-4-Clause
  • 更新时间: 2018-09-17