title: Getting console output in Laravel
body: <p>I need to capture the output of a console command to be sent by email as well when requested. How can I do this?</p>
  
  <p>How do I get the output generated from the following <code>$this-&gt;info()</code> calls?</p>
  
  <pre><code>$r = processData();
  
  $this-&gt;info("\nSubmitted data:");
  $this-&gt;info("SubmissionId: " . $r['submission_id']);
  $this-&gt;info("Status: " . $r['status']);
  </code></pre>