LotteryController.php 679 B

12345678910111213141516171819202122232425262728293031323334
  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. */
  20. class LotteryController extends BaseController
  21. {
  22. /**
  23. *
  24. * @return array
  25. */
  26. public function test(){
  27. $user = User::where(['id'=> 1])->first();
  28. return ApiResource::success(1008, $user);
  29. }
  30. }