Misc helper functions for Laravel 4