Nelson Katale
Nelson Katale

Reputation: 1539

Class 'Carbon\Laravel\ServiceProvider' not found

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

Answers (2)

Arjun
Arjun

Reputation: 818

Simply delete 2 files from laravel/bootstrap file path. Then composer update

Upvotes: 1

adilimudassir
adilimudassir

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

Related Questions