Commit f1563f21 authored by Fabien Potencier's avatar Fabien Potencier

merged branch igorw/fix-json-recipe (PR #420)

Commits
-------

a3885545 Fix JSON recipe, fixes #419

Discussion
----------

Fix JSON recipe, fixes #419
parents 75ad4dee a3885545
......@@ -72,7 +72,7 @@ return the post object, including its ``id``, as JSON::
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
$app->post('/blog/posts', function (Request $request) {
$app->post('/blog/posts', function (Request $request) use ($app) {
$post = array(
'title' => $request->request->get('title'),
'body' => $request->request->get('body'),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment