Laravel JSON maxCDN / Chrome JSON Formatter does not work

Currently i am working with Laravel and the maxcdn API.
This is my very little test code

Route::get('cdn', function() {

    $api = new MaxCDN("myurl","mykey","mysecret");
    $data = $api->get('/account.json');
    return response()->json($data);

});

The header is set to json as you see

application/json

Now if i visit my /cdn url the Chrome JSON Formatter should be of course formate the output. But it does not work, i only get this output


"{"code":200,"data":{"account":{"id":"12312","name":"My Name ","alias":"myurl","date_created":"2015-05-17 07:51:50","date_updated":"0000-00-00 ........

I am working on my homestead machine


php -v
PHP 5.6.6-1+deb.sury.org~utopic+1 (cli) (built: Feb 20 2015 11:25:37)
Copyright (c) 1997-2015 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies
with Zend OPcache v7.0.4-dev, Copyright (c) 1999-2015, by Zend Technologies
with Xdebug v2.2.5, Copyright (c) 2002-2014, by Derick Rethans


Source: laravel

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.