Skip to content

Instantly share code, notes, and snippets.

@gabriel403
Created May 19, 2015 14:35
Show Gist options
  • Save gabriel403/d943820184971cefd31d to your computer and use it in GitHub Desktop.
Save gabriel403/d943820184971cefd31d to your computer and use it in GitHub Desktop.
Content-Type:application/json;charset=UTF-8
{"id":null,"stage":"initial","updated_at":"Tue, 19 May 2015 14:23:50 GMT","created_at":"Tue, 19 May 2015 14:23:50 GMT","emailText":"initial email","emailStage":"initial"}
$app->map(['POST'], '/trails', function ($request, $response, $args) {
error_log(var_export($args, true));
error_log(var_export($request->getParsedBody(), true));
// $trail = Trail::create($request->getParsedBody());
// $response->write($trail->toJson());
return $response;
});
[Tue May 19 15:23:56 2015] array (
)
[Tue May 19 15:23:56 2015] NULL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment