1. Go to this page and download the library: Download ruvents/yii-behaviors library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?phprequire_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ruvents / yii-behaviors example snippets
$tableSchema = [
'Id' => 'serial primary key',
'PostId' => 'integer not null',
'UserId' => 'integer not null',
'Name' => 'varchar(1000) not null',
'Body' => 'text not null'
];
$tableSchema = array_merge($tableSchema, DeletableBehavior::getMigrationFields());
$tableSchema = array_merge($tableSchema, UpdatableBehavior::getMigrationFields());
$this->createTable('BlogPost', $tableSchema);
/*
* Методы AttributableBehavior
* @method Role byAttribute($attribute, $value)
* @method Role byAttributeExists($attribute)
* @method Role byAttributeSearch($attribute, $value)
*/
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.