I'm having a bit of trouble getting a custom package to work when deploying my Laravel app to Heroku. It works fine locally, but when pushed I get the following error:
In ProviderRepository.php line 208: Class 'totalWebConnections\simpleBlog\simpleBlogServiceProvider' not found
It looks like the server is correctly loading the package from my composer file, just above the error in the log:
Installing totalwebconnections/simple-blog (1.0.0)
In my composer.json
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.4.*",
"laravel/tinker": "~1.0",
"totalwebconnections/simple-blog": "1.0.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/",
"totalWebConnections\\simpleBlog\\": "vendor/totalWebConnections/simple-blog/src/"
}
},
And then in my app.php
totalWebConnections\simpleBlog\simpleBlogServiceProvider::class,
I'm not sure what the issue is?
我认为您应该仔细检查名称空间和文件名大小写-例如,当您在Windows上部署时,它并不关心它是simpleBlog还是SimpleBog,但是当它部署到Linux服务器时,如果它与100%的名称不相同,则将不起作用应该。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.