Skip to content

MalankaTeam/yii2-components

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MALANKA Logo

Additional component Module

The additional components for Yii2 framework.

The main purpose of this module to provide the ability to wrap common function from PHP and Yii2 framework.

Installation

For the installation of modules Composer is required

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:

use robot72\components\helpers\MigrationHelper;

class m000000_092100_our_migration extends MigrationHelper
{
    public $tableName = '{{%lead_generate}}';

    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);
    }
}

About

The additional components for Yii2 framework.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%