closes https://github.com/laravel/framework/issues/3785