Try to var_dump($request->all()) and you will see, that your json input converted to ordinary key => value during request.
// post
{
"name": "Joe",
"email": "[email protected]",
"password": "fe41e#tgdr5",
"phone": "1234567890",
"country": "US"
}
// controller
$request->name // Joe
$request->country // US
Json type parameter is
{
"name": {"first": "Joe", "last": "Doe"},
"email": "[email protected]",
"password": "fe41e#tgdr5",
"phone": "1234567890",
"country": {"main": "US", "birth": "UK"}
}
or
{
"data": {
"name": "Joe",
"email": "[email protected]",
"password": "fe41e#tgdr5",
"phone": "1234567890"
}
}
In that case you can validate it like json type, otherwise it's just plain key -> (string) value