承接 yiier/yii2-invite-code 相关项目开发

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

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

yiier/yii2-invite-code

Composer 安装命令:

composer require yiier/yii2-invite-code

包简介

invite code for Yii2

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License

invite code for Yii2

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist yiier/yii2-invite-code "*"

or add

"yiier/yii2-invite-code": "*"

to the require section of your composer.json file.

Usage

mirage database

$ php yii migrate --migrationPath=@yiier/inviteCode/migrations/

change config

change console\config\main.php

'params' => $params,
...
'controllerMap' => [
    'gcode' => [
        'class' => 'yiier\inviteCode\GCodeController',
    ]
]

console

$ php yii gcode 200

or

$ php yii gcode

change form view signup.php

// ...
<?= $form->field($model, 'password')->passwordInput() ?>

<?= $form->field($model, 'inviteCode')->textInput() ?>
// ...

change SignupForm.php

// ...
public $inviteCode;


// ...
public function rules()
{
    return [
        // ...
        ['inviteCode', 'required'],
        ['inviteCode', 'yiier\inviteCode\CodeValidator'],
    ];
}

// ...
public function signup()
{
    // ...
    
    // return $user->save() ? $user : null;
    // after change
    if ($user->save()) {
        InviteCode::useCode($this->inviteCode, $user->id);
        return $user;
    }
    return null;
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2016-04-28

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固