Get data incoming using $request->get('bar')
in routes PUT using SILEX
$app->put('foo/{id}', function(Request $request, $id) use ($app){
return var_dump($request->get('bar')); //return null
});
Why return null? How do I access data?
You are getting null because var_dump
returns null. var_dump
prints the content of the variable to screen, but does not return it. You may be looking for var_export
.