gpt4 book ai didi

php - Laravel 5 - 供应商 - 未找到类

转载 作者:行者123 更新时间:2023-12-02 16:17:22 29 4
gpt4 key购买 nike

我正在使用 laravel-analytics ( https://github.com/spatie/laravel-analytics/ ) 并已在本地安装了所有内容,工作正常。

但是,每当我尝试上传到服务器时,访问页面时都会出现以下错误:未找到“LaravelAnalytics”类,并且我尝试通过以下方式访问它:use\LaravelAnalytics 作为分析;

我在本地和服务器上都使用 Linux 操作系统。我还运行了:composer update,现在得到:无需安装或更新

我已经检查了 .json 文件,可以看到我尝试安装的包就在那里。

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"illuminate/html": "5.*",
"spatie/laravel-analytics": "^1.2"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1"
},
"autoload": {
"classmap": [
"database"
],
"files":
["app/Http/helpers.php"],

"psr-4": {
"App\\": "app/"
}
},
"autoload-dev": {
"classmap": [
"tests/TestCase.php"
]
},
"scripts": {
"post-install-cmd": [
"php artisan clear-compiled",
"php artisan optimize"
],
"pre-update-cmd": [
"php artisan clear-compiled"
],
"post-update-cmd": [
"php artisan optimize"
],
"post-root-package-install": [
"php -r \"copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"php artisan key:generate"
]
},
"config": {
"preferred-install": "dist"
}
}

有人对我缺少什么或哪里出错有任何想法吗?

最佳答案

我也遇到过类似的问题。上传供应商/ Composer 文件夹对我有用!

关于php - Laravel 5 - 供应商 - 未找到类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32068649/

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