laravel/framework — pull request #4300 by kapv89 (2014-05-01 19:57:23+00:00)
Title: Allow attributesToArray handle instances of ArrayableInterface

Ran into a stackoverflow question where the problem was that attributesToArray wasn't able to handle instances of ArrayableInterface properly. So added handling for that in the model