git clone
composer install
yii init
#правите локальные конфиги (прописываете базу)
yii migrate
git pull
composer install
yii migrate
yii migrate/create createUserTable
/**
* @var array|\Closure the HTML attributes for the data cell tag. This can either be an array of
* attributes or an anonymous function that ([[Closure]]) that returns such an array.
* The signature of the function should be the following: `function ($model, $key, $index, $gridView)`.
* A function may be used to assign different attributes to different rows based on the data in that row.
*
* @see \yii\helpers\Html::renderTagAttributes() for details on how attributes are being rendered.
*/
public $contentOptions = [];
public function beforeValidate()
{
$attrs = [ 'time', 'testing', 'call' ];
foreach ( $attrs as $attr ) {
$time = \DateTime::createFromFormat( 'Y-m-d H:i:s', $this->$attr );
if ( !$time ) continue;
$this->$attr = $time->format( 'U' );
}
parent::beforeValidate();
return true;
}