/** * @return \yii\db\ActiveQuery */ public function getProducts() { return $this->hasMany(Product::className(), ['exam_id' => 'id']); }
public function beforeValidate() { $this->updateTimestamps(); return parent::beforeValidate(); }