PHP laravel I have a problem in composer when installing or remove packages or writing any command for the composer
PHP laravel I have a problem in composer when installing or remove packages or writing any command for the composer
first of all your composer command should be composer remove laravel/telescope instead of vendor/telescope.
you should rename this file from app/Models/Service_old.php to app/Models/Service.php, if there is another file in the same directory with the same Service.php name, 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
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