[英]php laravel i have a problem in composer when install or remove packages or write any command for composer
first of all your composer command should be composer remove laravel/telescope
instead of vendor/telescope
.首先,您的 composer 命令应该是composer remove laravel/telescope
而不是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.您应该将此文件从app/Models/Service_old.php
重命名为app/Models/Service.php
,如果同一目录中有另一个文件具有相同的名称Service.php
(或 93CEE4AC0B6E8)其他地方,所以它不会被作曲家自动检测到。
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:最后,虽然屏幕截图中没有提供 package 发现问题,但您可以运行以下命令并查看之后的情况:
composer clear-cache
composer dump-autoload
php artisan optimize:clear
Make sure your storage/
& bootstrap/cache
directory writable.确保您的storage/
& bootstrap/cache
目录可写。
Make sure your .env
file doesn't contain any spaces.确保您的.env
文件不包含任何空格。
Ex: key=value
instead of key=va lue
例如: key=value
而不是key=va lue
=value
remove the bootstrap/cache/config.php
file.删除bootstrap/cache/config.php
文件。 then然后
composer dump-autoload
Try to remove /bootstrap/compiled.php
( if you have it )尝试删除/bootstrap/compiled.php
(如果有的话)
most likely the problem is with caching as all what we do here is remove the cached files很可能问题出在缓存上,因为我们在这里所做的就是删除缓存的文件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.