Category Archives: Lumen

Fix JSON decoding syntax error

I got a long JSON string from DB, and try to decode the string using json_decode() in PHP, I get null, the empty object. But when I tested it in a JSON pretty page, everything looks good. It’s no single/double-quotes … Continue reading

Posted in Computers and Internet, Laravel, Lumen, Uncategorized, Yii | Leave a comment

Lumen: Request

$request->input() is as same as $request->all(), all return an array, but $request->getContent(), which will return input parameters in an JSON string $request->getContent():{“maxResults”:9999,”publicCategoryOnly”:true} $request->input(): Array (     [maxResults] => 9999     [publicCategoryOnly] => 1 ) $request->all(): Array (     [maxResults] => … Continue reading

Posted in Lumen | Tagged | Leave a comment