OrderController.php 801 B

1234567891011121314151617181920212223242526272829
  1. <?php
  2. namespace App\Http\Controllers\api\thirdPart\syrius\producer;
  3. use App\Http\Controllers\api\thirdPart\syrius\beans\Task;
  4. class OrderController extends Controller
  5. {
  6. public function createOrder(Task $order)
  7. {
  8. $this->method = "post";
  9. $this->data = [(array)$order];
  10. $this->url = config("api.syrius.request.create_order");
  11. $response = $this->response();
  12. if (!$response)dd("服务器通信异常,检查错误日志");
  13. dd($response->body());
  14. }
  15. public function getOrder(string $id)
  16. {
  17. $this->method = "get";
  18. $this->url = config("api.syrius.request.find_order").$id;
  19. $response = $this->response();
  20. if (!$response)dd("服务器通信异常,检查错误日志");
  21. dd($response->body());
  22. }
  23. }