123456789101112131415161718192021222324252627282930 |
- <?php
- // +—————————————————————————————————————————————————————————————————————
- // | Created by Yunbao
- // +—————————————————————————————————————————————————————————————————————
- // | Copyright (c) 2013~2022 http://www.yunbaokj.com All rights reserved.
- // +—————————————————————————————————————————————————————————————————————
- // | Author: https://gitee.com/yunbaokeji
- // +—————————————————————————————————————————————————————————————————————
- // | Date: 2022-02-17
- // +—————————————————————————————————————————————————————————————————————
- namespace app\portal\controller;
- use cmf\controller\HomeBaseController;
- use app\portal\service\PostService;
- class PageController extends HomebaseController{
- public function index() {
-
- $postService = new PostService();
- $pageId = $this->request->param('id', 0, 'intval');
- $page = $postService->publishedPage($pageId);
- if (empty($page)) {
- abort(404, ' 页面不存在!');
- }
- $this->assign('page', $page);
-
- return $this->fetch();
- }
- }
|