LotteryController.php 702 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * This file is part of Hyperf.
  5. *
  6. * @link https://www.hyperf.io
  7. * @document https://hyperf.wiki
  8. * @contact group@hyperf.io
  9. * @license https://github.com/hyperf/hyperf/blob/master/LICENSE
  10. *
  11. */
  12. namespace App\Controller\Api;
  13. use App\Model\User;
  14. use App\Controller\Resource\ApiResource;
  15. use Hyperf\HttpServer\Annotation\AutoController;
  16. /**
  17. * Class LotteryController
  18. * @package App\Controller\Api
  19. * @AutoController()
  20. *
  21. */
  22. class LotteryController extends BaseController
  23. {
  24. /**
  25. *
  26. * @return array
  27. */
  28. public function test(){
  29. $user = User::where(['id'=> 1])->first();
  30. return ApiResource::success(1008, $user);
  31. }
  32. }