Laravel - Requests - Retrieving Json Input Values
When sending JSON requests to your application, you may access the JSON data via the input
method as long as the Content-Type
header of the request is properly set to application/json
. You may even use "dot" syntax to retrieve values that are nested within JSON arrays:
$name = $request->input('user.name');