PHP laravel I have a problem in composer when installing or remove packages or writing any command for the composer
CodePudding user response:
first of all your composer command should be
composer remove laravel/telescopeinstead ofvendor/telescope.you should rename this file from
app/Models/Service_old.phptoapp/Models/Service.php, if there is another file in the same directory with the sameService.phpname, then move the old one (or change its extension) somewhere else so it will not be auto detected by composer.at last, while the package discovery issue is not provided in the screenshot, you may run the following commands and see how things went after:
composer clear-cache
composer dump-autoload
php artisan optimize:clear
CodePudding user response:
Make sure your storage/ & bootstrap/cache directory writable.
Make sure your .env file doesn't contain any spaces.
Ex: key=value instead of key=va lue
remove the bootstrap/cache/config.php file. then
composer dump-autoload
Try to remove /bootstrap/compiled.php ( if you have it )
most likely the problem is with caching as all what we do here is remove the cached files

