true, 'targetClass' => FixCarT::className(), 'targetAttribute' => ['fix_id' => 'id']], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'fix_id' => 'Fix ID', 'type' => 'Type', 'status' => 'Status', ]; } /** * @return \yii\db\ActiveQuery */ public function getFix() { return $this->hasOne(FixCarT::className(), ['id' => 'fix_id']); } public function getItems(){ return $this->hasMany(FixCarItemT::className(),['fix_id'=>'fix_id']); } }