mongosoft/yii2-mongodate-behavior 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

mongosoft/yii2-mongodate-behavior

最新稳定版本:0.2.0

Composer 安装命令:

composer require mongosoft/yii2-mongodate-behavior

包简介

MongoDate behavior for Yii 2

README 文档

README

MongoDateBehavior automatically fills the specified attributes with the current ISODate.

By default, MongoDateBehavior will fill the created and updated attributes with the current ISODate when the associated AR object is being inserted; it will fill the updated attribute with the ISODate when the AR object is being updated.

Latest Stable Version Total Downloads

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist mongosoft/yii2-mongodate-behavior "*"

or add

"mongosoft/yii2-mongodate-behavior": "*"

to the require section of your composer.json file.

Usage

Upload file

Attach the behavior in your model:

class User extends ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function collectionName()
    {
        return 'user';
    }

    /**
     * @inheritdoc
     */
    public function attributes()
    {
        return [
            '_id', 'name', 'created', 'updated',
        ];
    }

    /**
     * @inheritdoc
     */
    function behaviors()
    {
        return [
            MongoDateBehavior::className(),
        ];
    }
}

统计信息

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

GitHub 信息

  • Stars: 6
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固