Пример #1
0
 public function webKeyWords()
 {
     $model = Keywords::find()->select(['keywords', 'keywords_des'])->where(['key_id' => 1])->asArray()->one();
     return $model;
 }
Пример #2
0
 /**
  * Finds the Keywords model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Keywords the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Keywords::findOne($id)) !== null) {
         return $model;
     } else {
         return false;
     }
 }