<?php
 namespace App\Web\Controller; use Illuminate\Support\Facades\View; use ModStart\App\Web\Layout\WebConfigBuilder; use ModStart\Form\Form; use Module\Member\Auth\MemberUser; use Module\Member\Support\MemberLoginCheck; use Module\Member\Type\Gender; class MemberProfileController extends BaseController implements MemberLoginCheck { private $api; private $viewMemberFrame; public function __construct() { list($this->viewMemberFrame, $_) = $this->viewPaths('member.frame'); View::share('_viewMemberFrame', $this->viewMemberFrame); $this->api = app(\App\Api\Controller\MemberProfileController::class); } public function index(WebConfigBuilder $builder) { $builder->pageTitle('基本资料'); $builder->page()->view($this->viewMemberFrame); $builder->text('username', '用户名')->readonly(true); $builder->radio('gender', '性别')->optionType(Gender::class); $builder->text('realname', '姓名'); $builder->text('signature', '签名'); return $builder->perform(MemberUser::user(), function (Form $form) { return $this->api->basic($form->dataForming()); }); } }