GongdengOrderController.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Laravel框架 [ Laravel ]
  4. // +----------------------------------------------------------------------
  5. // | 版权所有 2017~2021 Laravel研发中心
  6. // +----------------------------------------------------------------------
  7. // | 官方网站: http://www.laravel.cn
  8. // +----------------------------------------------------------------------
  9. // | Author: wesmiler <12345678@qq.com>
  10. // +----------------------------------------------------------------------
  11. namespace App\Http\Controllers;
  12. use App\Http\Validator\GongdengValidator;
  13. use App\Services\GongdengOrderService;
  14. use App\Services\OrdersService;
  15. /**
  16. * 供灯订单管理-控制器
  17. * @author wesmiler
  18. * @since 2020/11/11
  19. * Class GongdengOrderController
  20. * @package App\Http\Controllers
  21. */
  22. class GongdengOrderController extends Backend
  23. {
  24. /**
  25. * 构造函数
  26. * @author wesmiler
  27. * @since 2020/11/11
  28. * GongdengOrderController constructor.
  29. */
  30. public function __construct()
  31. {
  32. parent::__construct();
  33. $this->service = new GongdengOrderService();
  34. }
  35. /**
  36. * 供灯下单
  37. * @return mixed
  38. */
  39. public function buy(GongdengValidator $validator){
  40. $params = $validator->check(request()->all(),'buy');
  41. if(!is_array($params)){
  42. return message($params, false);
  43. }
  44. return $this->service->cardBuy();
  45. }
  46. }