Laravel 5 - laracasts generator

时间:2017-07-20 09:33:44

标签: php laravel install

嗨我安装Laravel 5 Extended Generators有问题

当我在控制台中时

composer require laracasts/generators --dev

控制台返回错误

  

[Symfony \ Component \ Debug \ Exception \ FatalErrorException] Trait   '照亮\控制台\ AppNamespaceDetectorTrait'未找到       PHP致命错误:Trait' Illuminate \ Console \ AppNamespaceDetectorTrait'找不到   第16行的C:\ xampp \ htdocs \ project-app \ vendor \ laracasts \ generators \ src \ Commands \ MigrationMakeCommand.php       脚本php artisan优化处理返回的post-update-cmd事件,错误代码为255

     

安装失败,将./composer.json恢复为原始版本   内容。

我的作曲家

"require": {
    "laracasts/generators": "dev-master as 1.1.4",
    "php": ">=5.6.4",
    "backpack/base": "^0.7.21",
    "backpack/crud": "^3.2",
    "laravel/framework": "5.4.*",
    "laravel/tinker": "~1.0"

},
"require-dev": {

    "fzaninotto/faker": "~1.4",
    "mockery/mockery": "0.9.*",
    "phpunit/phpunit": "~5.7"

},

1 个答案:

答案 0 :(得分:1)

我将AppNamespaceDetectorTrait更改为DetectsApplicationNamespace(使用x 2): 供应商/ laracasts /发电机/ SRC /命令/ MigrationMakeCommand.php

使用' dev-master'在composer.phar中运行' composer update'在最新提交4e9ce5d

中提取修复程序
require{
"laracasts/generators": "dev-master",
}