/** * @return \yii\db\ActiveQuery */ public function getBrands() { return $this->hasMany(brands::className(), ['createdBy' => 'id']); }