Utilidad basada en la version 1.1 de https://github.com/JeffreyWay/Laravel-4-Generators