2017 © Pedro Peláez
 

yii2-extension yii2-datetime-behavior

Initiates database date columns as DateTime PHP classes.

image

easyconn/yii2-datetime-behavior

Initiates database date columns as DateTime PHP classes.

  • Friday, March 30, 2018
  • by zhuzhu
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Yii2 DateTime Behavior

Initiates database date columns as DateTime PHP classes., (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist davidhirtz/yii2-datetime-behavior "*"

or add, (*4)

"davidhirtz/yii2-datetime-behavior": "*"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, simply use it in your code by adding it to your ActiveRecord behavior. If you don't set the attributes all "date" and "datetime" columns will be automatically selected., (*6)

use davidhirtz\yii\datetime\DateTimeBehavior;
public function behaviors()
{
    return [
        [
            'class'=>DateTimeBehavior::className(),
            //'attributes'=>['custom_attribute', 'another_attribute'],
        ],
    ];
}

The Versions

30/03 2018

dev-master

9999999-dev

Initiates database date columns as DateTime PHP classes.

  Sources   Download

BSD-3-Clause

The Requires

 

by David Hirtz

extension yii2 datetime

30/03 2018

1.0.0

1.0.0.0

Initiates database date columns as DateTime PHP classes.

  Sources   Download

BSD-3-Clause

The Requires

 

by David Hirtz

extension yii2 datetime