data["active_test"] = "active"; } public function method(Request $request, $method) { try { return call_user_func([$this, $method], $request); }catch (\BadMethodCallException $e){ dd("方法不存在"); } } public function test(Request $request) { dd(implode(" ",User::query()->select("id")->pluck("id")->toArray())); Log::error(json_encode($request->header(),JSON_UNESCAPED_UNICODE)); return json_encode($request->header(),JSON_UNESCAPED_UNICODE); } }