composer.json文件删除了什么方法来恢复它?

时间:2016-10-28 21:56:48

标签: php json composer-php

我设法重新制作我的composer.json文件

我正在研究一个项目,错误地,主要的作曲家文件被删除了。 无法手动恢复它,我仍然有供应商文件夹和文件现在我无法添加任何其他因为它将删除当前供应商有没有任何方法重新生成与其中包含供应商的作曲家文件?

现在我正在

Whoops, looks like something went wrong.

1/1
FatalErrorException in Controller.php line 27:
Call to undefined function App\Http\Controllers\getcong()


{
    "name": "testing/test",
    "description": "test",
    "keywords": ["test"],
    "license": "MIT",
    "type": "project",
    "require": {
        "php": ">=5.5.9",
        "laravel/framework": "5.1.*",
        "SocialiteProviders/Manager": "^2.1",
        "Simexis/Installer": "^1.6",
        "Laravel/Socialite": "^2.0",
        "Intervention/Image": "^2.3",
        "Illuminate/Html": "^5.0",
        "laravel/socialite": "^2.0",
        "terbium/db-config": "^2.0",
        "laravelcollective/html": "5.*",
        "yajra/laravel-datatables-oracle": "^6.21",
        "socialiteproviders/vkontakte": "^2.0"
    },
      "require-dev": {
        "mockery/mockery": "0.9.*",
        "phpunit/phpunit": "~4.0",
        "phpspec/phpspec": "~2.1",
        "barryvdh/laravel-translation-manager": "0.2.x",
        "psy/psysh": "^0.7.2"
      },
      "autoload": {
        "classmap": [
          "database"
        ],
        "psr-4": {
          "App\\": "app/"
        }
      },
      "scripts": {
        "post-install-cmd": [
          "php artisan clear-compiled",
          "php artisan optimize"
        ],
        "pre-update-cmd": [

        ],
        "post-update-cmd": [
          "php artisan clear-compiled",
          "php artisan optimize",
          "php artisan serve"
        ],
        "post-root-package-install": [
          "php -r \"copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
          "php artisan key:generate"
        ]
      },
      "config": {
        "preferred-install": "dist"
      }
}

我相信这会导致错误:             " terbium / db-config":" ^ 2.0",

用法示例: getcong(' p-news')

谢谢。

1 个答案:

答案 0 :(得分:0)

我需要添加

 "files": [
        "app/Http/helpers.php"
    ]

到作曲家文件:)