TestController.php 825 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. }