Added compatibility for Laravel 4.1