5], ]; } /** * @inheritdoc */ public function attributeLabels() { return [ 'id' => 'ID', 'name' => 'Name', 'level' => 'Level', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } public function getFixCarMetals(){ return $this->hasMany(FixCarMetal::className(),['level_id'=>'id']); } public function getProject(){ return $this->hasMany(FixCarProject::className(),['id'=>'project_id']) ->via('fixCarMetals'); } }