protected function dbInsert($category, $key, $value)
    {
        $created_by = \Yii::$app->user->getId();
        $this->getDb()->createCommand('
        INSERT INTO
            {{setting}} (`category`, `key`, `value`, `created_at`, `created_by`)
        VALUES
            (:category, :key, :value, NOW(), :created_by)
        ', compact('category', 'key', 'value', 'created_by'))->execute();
    }
protected function dbInsert($category, $key, $value)
    {
        $created_by = \Yii::$app->user->getId();
        $this->getDb()->createCommand('
        INSERT INTO
            {{setting}} (`category`, `key`, `value`, `created_at`, `created_by`)
        VALUES
            (:category, :key, :value, NOW(), :created_by)
        ', compact('category', 'key', 'value', 'created_by'))->execute();
    }
protected function dbInsert ( $ category , $ key , $ value ) { $ created_by = \ Yii :: $ app -> user -> getId ( ) ; $ this -> getDb ( ) -> createCommand ( '
        INSERT INTO
            {{setting}} (`category`, `key`, `value`, `created_at`, `created_by`)
        VALUES
            (:category, :key, :value, NOW(), :created_by)
        ' , compact ( 'category' , 'key' , 'value' , 'created_by' ) ) -> execute ( ) ; }
Stores settings in database

@param string $category Category name
@param string $key Setting key
@param string $value Setting value
@throws \yii\db\Exception
Stores settings in database