laravel/laravel — pull request #1149 by weejames (2012-08-27 08:38:18+00:00)
Title: JSONP support added to JSON response type.

If the request includes a callback parameter - typically used for JSONP requests, then wrap the JSON response accordingly so that it will be picked up.

This means the same response call can be used in the controller regardless of the origin of the request.