gpt4 book ai didi

php - Laravel RuntimeException 无法扫描 "database"中的类,该类似乎既不是文件也不是文件夹

转载 作者:行者123 更新时间:2023-12-03 20:16:31 25 4
gpt4 key购买 nike

我正在尝试运行命令

composer update 

收到此错误消息:

[RuntimeException] Could not scan for classes inside "database" which does not appear to be a file nor a folder



这是我的 composer.json 里面的代码:
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"jenssegers/mongodb": "^2.0",

"lucadegasperi/oauth2-server-laravel": "^5.1",

"laravelcollective/html": "5.2.*",

"davibennun/laravel-push-notification": "dev-laravel5"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"symfony/css-selector": "2.8.*|3.0.*",
"symfony/dom-crawler": "2.8.*|3.0.*"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
],
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"post-update-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
]
},
"config": {
"preferred-install": "dist"
}

}

最佳答案

我们可以通过创建 database 来解决这个问题。我们项目根目录下的文件夹:<PROJECT_ROOT>/database .如果我们想确保所有东西都很好用,我们可以删除composer.lock文件并再次运行 composer update 命令。

关于php - Laravel RuntimeException 无法扫描 "database"中的类,该类似乎既不是文件也不是文件夹,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36857449/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com