GroupInviteLinkResource.php 607 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace App\Http\Resources\V3;
  3. use App\Services\V3\GroupInviteService;
  4. use Illuminate\Http\Request;
  5. /**
  6. * 一张团队邀请链接:客户端把 token 拼进自己的邀请页地址发给别人。
  7. *
  8. * 载荷由 {@see GroupInviteService::issue()} 组好,本类只做形状声明。
  9. */
  10. class GroupInviteLinkResource extends BaseResource
  11. {
  12. /**
  13. * @param Request $request
  14. * @return array{
  15. * token: string,
  16. * role: string,
  17. * expires_at: string
  18. * }
  19. */
  20. public function toArray($request): array
  21. {
  22. return $this->resource;
  23. }
  24. }