public function actionDeleteskill()
 {
     $skill_id = \Yii::$app->request->post('skill_id');
     $model = Skills::findOne($skill_id);
     if ($model->delete()) {
         return $model;
     } else {
         return $model;
     }
 }
示例#2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getSkill()
 {
     return $this->hasOne(Skills::className(), ['skill_id' => 'skill_id']);
 }
示例#3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getSkills()
 {
     return $this->hasMany(Skills::className(), ['skill_id' => 'skill_id'])->viaTable('user_skills', ['user_id' => 'id']);
 }