Other Response Types: JSON Responses

Return response()->json([
    'name' => 'Abigail',
    'state' => 'CA'
]);
Return response()
            ->json(['name' => 'Abigail', 'state' => 'CA'])
            ->withCallback($request->input('callback'));

If you would like to create a JSONP response, you may use the json method in combination with the withCallback method.

Other Response Types: JSON Responses — Structure map

Clickable & Draggable!

Other Response Types: JSON Responses — Related pages: