问题是,在某些字段列表中的长文本页面上,列表变得太宽,只有一种方法可以滚动它 - 您必须滚动到底部才能找到水平滚动条。因此,如果您需要查看第一行右侧的内容,您可以向下、向右并返回顶部。这很烦人。
有没有办法在不截断数据的情况下避免滚动?
有没有办法在表格顶部添加水平另一个滚动条?
在我可以输出的命令中
$this->error();
$this->info();
Run Code Online (Sandbox Code Playgroud)
但是如果我在 Command 中实例化其他类 - 我如何将彩色输出输出到该外部类中的控制台?其他类不扩展 Command 类。
我只找到了这个解决方案,我不喜欢它:)
<?php
use Illuminate\Console\Command;
class External
{
/** @var Command */
protected $command;
public function __construct(Command $command) {
$this->command = $command;
}
protected function error($msg)
{
$this->command->error($msg);
}
protected function info($msg, $v = null)
{
$this->command->info($msg, $v);
}
}
Run Code Online (Sandbox Code Playgroud)