, (*1)
Additional component Module
The additional components for Yii2 framework., (*2)
The main purpose of this module to provide the ability to wrap common function from PHP and Yii2 framework., (*3)
Installation
For the installation of modules Composer is required, (*4)
composer require malankateam/yii2-components:~0.1.0
Configuration
After adding to your composer json you have to create your migration and update migration file to:, (*5)
```php, (*6)
use robot72\components\helpers\MigrationHelper;, (*7)
class m000000_092100_our_migration extends MigrationHelper
{
public $tableName = '{{%lead_generate}}';, (*8)
public function up()
{
$this->setTableOptions();
$this->createTable($this->tableName, [
'id' => $this->primaryKey(),
'type' => $this->integer(11),
'data' => $this->text(),
'create_at' => $this->timestamp()->notNull(),
], $this->tableOptions);
}
public function down()
{
$this->dropTable($this->tableName);
}
}, (*9)