Example #1
0
 /**
  * Displays a single DictZh model.
  * @param integer $id
  * @return mixed
  */
 public function actionView($id)
 {
     //        $model=$this->findModel($id);
     $model = DictZhCyXs::findOne($id);
     //        var_dump($model);exit;
     if ($model == null) {
         throw new NotFoundHttpException();
     }
     return $this->render('view', ['model' => $model]);
 }
Example #2
0
 protected function getChengyu()
 {
     return DictZhCyXs::find()->where('title:' . $this->title)->limit(10)->all();
 }