1. Go to this page and download the library: Download tigrov/yii2-pgsql library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
/**
* @property string[] $attribute1 array of string
* @property array $attribute2 associative array or just array
* @property integer|string|\DateTime $attribute3 for more information about the type see \Yii::$app->formatter->asDatetime()
*/
class Model extends ActiveRecord
{
//...
public function rules()
{
return [
[['attribute1'], 'each', 'rule' => ['string']],
[['attribute2', 'attribute3'], 'safe'],
];
}
}