laravel/framework — pull request #508 by julien-c (2013-03-05 18:52:53+00:00)
Title: Add JSONResponse support for Arrayable data

That way seems more coherent with the default behaviour for controllers, for example when directly returning an Eloquent model from a controller.

If `$user` is an Eloquent model or any object that implements `ArrayableInterface` you can just write:

```php
return Response::json($user, 201, $headers);
```

Which is useful when you need to specify headers, etc.