当我尝试甚至开始修补时,我会看到:
Class 'Modules\BookingSystem\Providers\BookingSystemServiceProvider' not found
但是该类在指定的位置。我尝试使用作曲家转储自动加载,但仍然得到:
> @php artisan package:discover
In ProviderRepository.php line 208:
Class 'Modules\BookingSystem\Providers\BookingSystemServiceProvider'
not found
Script @php artisan package:discover handling the post-autoload-dump event
returned with error code 1
这可能是什么原因?
答案 0 :(得分:0)
鉴于问题中存在的事实,这似乎是最可能的解决方案:
有composer.json
的机会
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
}
},
到
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/",
"Modules\\": "modules/"
}
},
然后运行composer dump
一次:)