예제 #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]);
 }
예제 #2
0
파일: DictZh.php 프로젝트: awebc/web_xbf
 protected function getChengyu()
 {
     return DictZhCyXs::find()->where('title:' . $this->title)->limit(10)->all();
 }