Made compatible for laravel 4.1