承接 ofilin/yii2-fillmodel 相关项目开发

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

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

ofilin/yii2-fillmodel

Composer 安装命令:

composer require ofilin/yii2-fillmodel

包简介

Fill model from last saved model use Session

关键字:

README 文档

README

Automatic fill new model attributes with last saved model.

Last attributes stored in session

Installation

Add the package to your composer.json:

{
    "require": {
        "ofilin/yii2-fillmodel": "^0.1"
    }
}

and run composer update or alternatively run composer require ofilin/yii2-fillmodel:^0.1

Usage

In action create, add Fill::model($model, ['attribute_1', 'attribute_2', 'attribute_3']);

public function actionCreate()
{
    $model = new Posts();
    
    // Add this line:
    \ofilin\fillmodel\Fill::model($model, ['groups', 'scheduled_date', 'scheduled_time']);

    if ($model->load(Yii::$app->request->post()) && $model->save()) {
        return $this->redirect(['index']);
    }
    return $this->render('create', [
        'model' => $model,
    ]);
}

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-07-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固