Send output to Laravel's Artisan command or Symfony's Console command
Output via Laravel Artisan Command
If you run Terminal from the Laravel's Artisan command, you may send the output to the console by
passing an instance of the Command to the output
method:
public function handle()
{
Terminal::output($this)->run('echo Hello, World');
}
Output via Symfony Console Command
If you run Terminal from the Symfony's Console command, you may send the output to the console by
passing an instance of the OutputInterface to the output
method:
protected function execute(InputInterface $input, OutputInterface $output)
{
Terminal::output($output)->run('echo Hello, World');
}