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
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
Simply delete 2 files from laravel/bootstrap file path. Then composer update
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.