当前位置:  开发笔记 > 编程语言 > 正文

在laravel中找不到供应商类

如何解决《在laravel中找不到供应商类》经验,为你挑选了1个好方法。

我在项目中使用unisharp文件管理器。在我的本地计算机上,一切正常,但在远程服务器上[Symfony\Component\Debug\Exception\FatalErrorException] Class 'Unisharp\Laravelfilemanager\LaravelFilemanagerServiceProvider' not foundconfig/app.php一切正常都抛出错误

    /*FileMananger*/
    Unisharp\Laravelfilemanager\LaravelFilemanagerServiceProvider::class,
    Intervention\Image\ImageServiceProvider::class,
    /*CKEditor*/
    Unisharp\Ckeditor\ServiceProvider::class,

unisharpvedor中有目录(因此所有文件和目录都在其中)。当我尝试运行composer install / update时,再次出现此错误。所以一切都在正确的位置,但是laravel没有看到此类。

comoser.json

{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
    "php": ">=5.6.4",
    "laravel/framework": "5.3.*",
    "maatwebsite/excel": "~2.1.0",
    "appzcoder/crud-generator": "^1.2",
    "laravelcollective/html": "^5.3",
    "lavary/laravel-menu": "dev-master",
    "nesbot/carbon": "^1.21",
    "laracasts/flash": "^2.0",
    "spatie/laravel-medialibrary": "^3.11",
    "firebase/php-jwt": "^4.0",
    "doctrine/dbal": "^2.5"
},
"require-dev": {
    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~5.0",
    "symfony/css-selector": "3.1.*",
    "symfony/dom-crawler": "3.1.*"
},
"autoload": {
    "classmap": [
        "database"
    ],
    "psr-4": {
        "App\\": "app/"
    },
    "files": [
        "app/Http/helpers.php"
    ]
},
"autoload-dev": {
    "classmap": [
        "tests/TestCase.php"
    ]
},
"scripts": {
    "post-root-package-install": [
        "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
    ],
    "post-create-project-cmd": [
        "php artisan key:generate"
    ],
    "post-install-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postInstall",
        "php artisan optimize"
    ],
    "post-update-cmd": [
        "Illuminate\\Foundation\\ComposerScripts::postUpdate",
        "php artisan optimize"
    ]
},
"config": {
    "preferred-install": "dist"
}
}

小智.. 5

尝试在这些行中添加注释,config/app.php然后composer require unisharp/laravel-filemanager再次运行。

通过composer下载服务提供商之前,您无法设置它们。



1> 小智..:

尝试在这些行中添加注释,config/app.php然后composer require unisharp/laravel-filemanager再次运行。

通过composer下载服务提供商之前,您无法设置它们。

推荐阅读
农大军乐团_697
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有