我不确定为什么__call在这种情况下不起作用,是否与Command的实现方式或我做错了什么有关?
class MyCommand extends Command
{
protected $reports = [];
/**
* The console command name.
*
* @var string
*/
protected $name = 'test';
/**
* The console command description.
*
* @var string
*/
protected $description = '';
public function __call($methodName, $args) {
return call_user_func_array($methodName, $args);
}
}