Bringing changes from the laravel core

Bringing changes from the laravel core