How to get and validate application/json data in Laravel?
问题 I send data from client to server in application/json content type. Then I try to take this information in server side like as: public function register(Request $request) { $data = $request->json()->all(); var_dump($data); die(); } It returns me empty array() Also I tried to validate incoming POST using this: $validator = Validator::make($request->json()->all(), []); How to get and validate application/json data in Laravel? I get POST data like as: dd($_POST); array:1 [▼ "application/json" =>