true, 'targetClass' => FixMetalLevel::className(), 'targetAttribute' => ['level_id' => 'id']], [['project_id'], 'exist', 'skipOnError' => true, 'targetClass' => FixCarProject::className(), 'targetAttribute' => ['project_id' => 'id']], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'price' => 'Price', 'project_id' => 'Project ID', 'level_id' => 'Level ID', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } /** * @return \yii\db\ActiveQuery */ public function getLevel() { return $this->hasOne(FixMetalLevel::className(), ['id' => 'level_id']); } }