Solution to http://paste.laravel.com/srZ