Reputation: 1539
I've typed the command composer require uxweb/sweet-alert
in my command prompt to install sweet alert in my Laravel project and an error occurred while installing UxWeb sweet alert.
What could be the cause of this error ?
Error Message
Installation failed, reverting ./composer.json to its original content. In ProviderRepository.php line 208.
Class 'Carbon\Laravel\ServiceProvider' not found
Upvotes: 1
Views: 3293
Reputation: 818
Simply delete 2 files from laravel/bootstrap file path. Then composer update
Upvotes: 1
Reputation: 21
There is somewhere where you wrongly imported Carbon class. the correct namespace for Carbon in laravel is
Carbon\Carbon
you can search your codebase and find the error
OR
you can try deleting vendor folder and reinstall packages again
Upvotes: 2