loading...

Laravel Return Json

pakainfocom profile image pakainfo ・1 min read

Special Responses
Creating A JSON Response

return Response::json(array('name' => 'Pakainfo', 'state' => 'GJ'));

Creating A JSONP Response

return Response::json(array('name' => 'Pakainfo', 'state' => 'GJ'))->setCallback(Input::get('callback'));

Php Laravel Return Json Response

return response()->json([
    'name' => 'Pakainfo',
    'state' => 'GJ'
]);

Check out my previous post on Laravel Return Json and let me know if you still have any questions! It might inspire a future blog post!

Discussion

pic
Editor guide