You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
521 B

  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Controller;
  4. use App\Request\CommunityBindRequest;
  5. use App\Service\CommunityServiceInterface;
  6. use Hyperf\Di\Annotation\Inject;
  7. class CommunityController extends BaseController
  8. {
  9. /**
  10. * @Inject
  11. * @var CommunityServiceInterface
  12. */
  13. protected $communityService;
  14. public function bind(CommunityBindRequest $request)
  15. {
  16. $res = $this->communityService->bind($request->validated());
  17. return $this->success(['id' => $res->id]);
  18. }
  19. }