title: How to call an artisan console command with an interaction
body: <p>I'm currently creating a php artisan console command in a Laravel 5.1 project, and want to call another console command from my console command. This third party command I want to call does not accept any options or arguments, but rather receives its input via interactive questions.</p>
  
  <p>I know I can call a command with options and arguments like this:</p>
  
  <blockquote>
    <p>$this->call('command:name', ['argument' => 'foo', '--option' => 'bar']);</p>
  </blockquote>
  
  <p>I also know I can call an interactive command without interactions like this from the command line:</p>
  
  <blockquote>
    <p>php artisan command:name --no-interaction</p>
  </blockquote>
  
  <hr>
  
  <p>But how can I answer these interactive questions from within my command?</p>
  
  <p>I would like to do something like the below (pseudo code).</p>
  
  <pre><code>$this-&gt;call('command:name', [
      'argument' =&gt; 'foo', 
      '--option' =&gt; 'bar'
  ], function($console) {
      $console-&gt;writeln('Yes'); //answer an interactive question 
      $console-writeln('No'); //answer an interactive question 
      $console-&gt;writeln(''); //skip answering an interactive question 
  } );
  </code></pre>
  
  <hr>
  
  <p>Of course the above doesn't work, since <code>$this-&gt;call($command, $arguments)</code> does not accept a third callback parameter.</p>
  
  <p><strong>How can I answer interactive questions when calling a console command from a console command?</strong></p>