UserController.php 620 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Http\Controllers\Gteam;
  3. use App\Http\Controllers\Controller;
  4. use App\Http\Controllers\Miniprogram\Auth;
  5. use App\Services\Gteam\UserService;
  6. class UserController extends Controller
  7. {
  8. /**
  9. * 获取某个用户信息
  10. * @param int $uid
  11. * @return array
  12. * @throws \Tymon\JWTAuth\Exceptions\JWTException
  13. */
  14. public function getUser(int $uid)
  15. {
  16. Auth::auth();
  17. $us = new UserService();
  18. $data = $us->getUser($uid);
  19. return array(
  20. 'code' => 200,
  21. 'message' => 'success',
  22. 'data' => $data
  23. );
  24. }
  25. }