[ErrorException] 在/Applications/XAMPP/xamppfiles/htdocs/api/vendor/dingo/api/src/Console/Command/Docs.php中调用的Dingo\Blueprint\Blueprint::generate()缺少参数4
on line 95 and defined 异常跟踪:
() at /Applications/XAMPP/xamppfiles/htdocs/api/vendor/dingo/blueprint/src/Blueprint.php:83
Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() at /Applications/XAMPP/xamppfiles/htdocs/api/vendor/dingo/blueprint/src/Blueprint.php:83
Dingo\Blueprint\Blueprint->generate() at /Applications/XAMPP/xamppfiles/htdocs/api/vendor/dingo/api/src/Console/Command/Docs.php:95
Dingo\Api\Console\Command\Docs->handle() at n/a:n/a
call_user_func_array() at /Applications/XAMPP/xamppfiles/htdocs/api/vendor/laravel/framework/src/Illuminate/Container/Container.php:507
Illuminate\Container\Container->call() at /Applications/XAMPP/xamppfiles/htdocs/api/vendor/laravel/framework/src/Illuminate/Console/Command.php:150
Illuminate\Console\Command->execute() at /Applications/XAMPP/xamppfiles/htdocs/api/vendor/symfony/console/Command/Command.php:256
Symfony\Component\Console\Command\Command->run() at /Applications/XAMPP/xamppfiles/htdocs/api/vendor/laravel/framework/src/Illuminate/Console/Command.php:136
Illuminate\Console\Command->run() at /Applications/XAMPP/xamppfiles/htdocs/api/vendor/symfony/console/Application.php:841
Symfony\Component\Console\Application->doRunCommand() at /Applications/XAMPP/xamppfiles/htdocs/api/vendor/symfony/console/Application.php:189
Symfony\Component\Console\Application->doRun() at /Applications/XAMPP/xamppfiles/htdocs/api/vendor/symfony/console/Application.php:120
Symfony\Component\Console\Application->run() at /Applications/XAMPP/xamppfiles/htdocs/api/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:107
Illuminate\Foundation\Console\Kernel->handle() at /Applications/XAMPP/xamppfiles/htdocs/api/artisan:36发布于 2016-06-28 11:21:52
发布于 2017-05-07 13:01:43
凯文的解决方案对我不起作用。(使用laravel 5.1 )
在替换了Docs.php之后,我得到了Blueprint类的错误。
所以:
来代替凯文的解决方案。我找到了一个简单的方法,可以在一秒钟内完成。
:)
修改文件:供应商/dingo/api/src/Console/Command/Docs.php
$contents = $this->blueprint->generate($this->getControllers(), $this->argument('name'), $this->argument('version'));使用以下代码:
$contents = $this->blueprint->generate($this->getControllers(), $this->argument('name'), $this->argument('version'),'');只需在函数调用的末尾添加一个,'',即第四个参数的位置。
https://stackoverflow.com/questions/38007354
复制相似问题