/** * 根据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.'); } }