<?php
 namespace Module\Question\Web\Controller; use Illuminate\Support\Facades\View; use ModStart\Core\Input\Request; use ModStart\Core\Input\Response; use ModStart\Core\Util\PageHtmlUtil; use ModStart\Module\ModuleBaseController; use Module\Member\Support\MemberLoginCheck; class QuestionFavoriteMemberController extends ModuleBaseController implements MemberLoginCheck { private $api; private $viewMemberFrame; public function __construct() { list($this->viewMemberFrame, $_) = $this->viewPaths('member.frame'); View::share('_viewMemberFrame', $this->viewMemberFrame); $this->api = app(\Module\Question\Api\Controller\QuestionFavoriteMemberController::class); } public function submit() { return Response::jsonFromGenerate($this->api->submit()); } public function index() { $data = Response::tryGetData($this->api->paginate()); $data['pageHtml'] = PageHtmlUtil::render($data['total'], $data['pageSize'], $data['page'], '?' . Request::mergeQueries(['page' => ['{page}']])); $data['pageTitle'] = '收藏的题目'; return $this->view('memberQuestionFavorite.list', $data); } }