您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

39 行
816B

  1. <?php
  2. namespace App\Http\Controllers\Web\Auth;
  3. use App\Exceptions\AppCommonException;
  4. use App\Http\Controllers\Web\WebController;
  5. use Illuminate\Http\JsonResponse;
  6. use Illuminate\Http\Request;
  7. class MeController extends WebController
  8. {
  9. use Me;
  10. public function name(): string
  11. {
  12. return "ログインユーザー情報の参照";
  13. }
  14. public function description(): string
  15. {
  16. return "ログインユーザー情報を取得する";
  17. }
  18. public function __construct(protected MeParam $param)
  19. {
  20. parent::__construct();
  21. }
  22. protected function run(Request $request): JsonResponse
  23. {
  24. try {
  25. return $this->successResponse($this->me());
  26. } catch (AppCommonException) {
  27. return $this->failedResponse();
  28. }
  29. }
  30. }