<?php

namespace App\Web\Controller;


use EdwinFound\Laravel\Http\Response;
use TechSoft\Laravel\Post\PostUtil;

class PostController extends BaseController
{
    public function view($id)
    {
        $post = PostUtil::get($id);
        if (empty($post)) {
            return Response::send(-1, '记录不存在');
        }
        return $this->_view('postView', [
            'post' => $post,
        ]);
    }
}