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