php – Laravel Command->选择循环
发布时间:2020-12-14 19:37:14 所属栏目:大数据 来源:网络整理
导读:使用Laravel 5.2(当前是最新版本)在使用artisan function choice()时循环.我的代码是基本的: ?phpnamespace AppConsoleCommands;use IlluminateConsoleCommand;class TestCommand extends Command{ protected $signature = 'function:menu'; public fun
使用Laravel 5.2(当前是最新版本)在使用artisan function choice()时循环.我的代码是基本的:
<?php namespace AppConsoleCommands; use IlluminateConsoleCommand; class TestCommand extends Command { protected $signature = 'function:menu'; public function handle() { $this->choice('select yes',['yes']); } } 我跑的时候 php artisan function:menu 我明白了 select yes: [0] yes > [ERROR] Undefined variable: output select yes: [0] yes > [ERROR] Undefined variable: output 它不停地循环不停地输入.它在Windows 7和Debian GNU / Linux 8(jessie)上运行良好,但在CentOS版本6.7(最终版)上全新安装了laravel.有谁知道为什么? 解决方法
我很确定错误不是你所做的选择句柄的结果.检查您的日志以获取更多信息,因为我认为源代码位于您应用中的其他位置.
cat -n 100 storage/logs/__your_latest_logfile.log (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |