예제 #1
0
 public function actionPrint()
 {
     $id = Yii::$app->request->get('id');
     $model = Group::find()->where(['`' . Group::tableName() . '`.id' => $id])->joinWith(['label', 'type', 'estimate'])->one();
     if ($id == '' || $model === null) {
         echo '找不到该数据!';
         Yii::$app->end();
     }
     return $this->render('print', ['model' => $model]);
 }