src/commands/SetupController.php
private function insert($table, array $fields)
    {
        return Yii::$app->db->createCommand()->insert($table, $fields)->execute();
    }
private function insert($table, array $fields)
    {
        return Yii::$app->db->createCommand()->insert($table, $fields)->execute();
    }
private function insert ( $ table , array $ fields ) { return Yii :: $ app -> db -> createCommand ( ) -> insert ( $ table , $ fields ) -> execute ( ) ; }
Helper to insert data in database table.

@param string $table The database table
@param array $fields The array with insert fields
@return int
Helper to insert data in database table .