TestController.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace App\Http\Controllers;
  3. use App\Components\AsyncResponse;
  4. use App\Components\Database;
  5. use App\Components\ErrorPush;
  6. use App\Exceptions\Exception;
  7. use App\Services\WaybillService;
  8. use App\User;
  9. use App\Waybill;
  10. use Illuminate\Http\Request;
  11. use Illuminate\Support\Facades\DB;
  12. use Illuminate\Support\Facades\Hash;
  13. class TestController extends Controller
  14. {
  15. use AsyncResponse, ErrorPush, Database;
  16. const ASNREFERENCE_2 = 'ASNREFERENCE2';
  17. public function __construct()
  18. {
  19. $this->data["active_test"] = "active";
  20. }
  21. public function method(Request $request, $method)
  22. {
  23. try {
  24. return call_user_func([$this, $method], $request);
  25. }catch (\BadMethodCallException $e){
  26. dd("方法不存在");
  27. }
  28. }
  29. public function test()
  30. {
  31. $url = config('api.java.base').config('api.java.device.picking.getContainerOfWave');
  32. $request = Http::get($url, ["container" => "1"]);
  33. $result = $request->json();
  34. dd($result);
  35. }
  36. }