<?php
 namespace Module\Question\Web\Controller; use ModStart\Core\Input\InputPackage; use ModStart\Core\Input\Response; use ModStart\Module\ModuleBaseController; class QuestionCommentController extends ModuleBaseController { private $api; public function __construct() { $this->api = app(\Module\Question\Api\Controller\QuestionCommentController::class); } public function lists($alias) { InputPackage::mergeToInput('alias', $alias); return Response::jsonFromGenerate($this->api->lists()); } public function post($alias) { InputPackage::mergeToInput('alias', $alias); $ret = $this->api->post(); return Response::jsonIfGenerateSuccess($ret, '评论成功', null, '[reload]'); } public function delete() { $ret = $this->api->delete(); return Response::jsonIfGenerateSuccess($ret, null, null, '[reload]'); } }