예제 #1
0
 /**
  * 根据ID查找公众号
  * @param $id
  * @return Object
  * @throws NotFoundHttpException
  */
 protected function findWechat($id)
 {
     if (($model = Wechat::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }