laravel/framework — pull request #129 by bencorlett (2013-01-23 00:06:16+00:00)
Title: Adding support for ArrayableInterface and JsonableInterface in Message Bag

Hi Taylor,

I've added support (and tests obviously) for the MessageBag to implement both `ArrayableInterface` and `JsonableInterface` which includes `__toString()`.

This is useful, for example it can allow you to return a `MessageBag` instance and have it returned as an array. I've been using it for validation within APIs and it proves to be quite useful. It obviously does not take away any functionality and I can see a number of use-cases for it.

Thanks,

\- Ben

Signed-off-by: Ben Corlett