Im using Laravel 7.* and i want to post data as JSON to laravel route.
Due to the Laravel documantation JSON fileds must be accessible using this code :
$name = $request->input('user.name');
this is a pieces of laravel documentation :
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.
I'm testing it by RestMan extension in browser and i'm sending data with content-type:application/json Header .
But the $request->input() is empty always.
I tested $request->json(); and this method is working fine . why input() method NOT works for retrive json data ?
Edit :
this is my request in RestMan :

And this is my Route :
Route::post('/get-json-data',function(Request $request){
return $request->input('user.name');
});