None of the solution worked for me. You can use these commands for solving the issue:
Remove bootstrap/cache/config.php file then:
composer dumpautoloadcomposer update
Remove vendor folder then:
composer install
If still not solved, your last option maybe to create new Laravel project:With new folder:
composer create-project --force laravel/laravel my-joyful-project
Without new folder:
composer create-project --force laravel/laravel .
It should solve the issue. If still no, make sure you do not have older laravel version. And lastly, make sure that it is Laravel project you are working on, not Silverstripe. They are both using composer and have similar configuration files. Easy to mess up or maybe not :)