title: Laravel 5: app() helper function
body: <p>Why should someone use this:</p>
  
  <pre><code>function flash($title)
  {
      $flash = app('App\Http\Flash');
  
      return $flash-&gt;message('This is a flash message');
  }
  </code></pre>
  
  <p>over this:</p>
  
  <pre><code>use App\Http\Flash;
  
  function flash($title)
  {
      $flash = new Flash;
  
      return $flash-&gt;message('This is a flash message');
  }
  </code></pre>
  
  <p>In the first case we are getting the available container instance.</p>
  
  <p>In the second case we load the Flash class and instantiate it then in our flash method.</p>
  
  <p>I've seen someone use the first approach and I wonder if there is ANY difference in using the second approach.</p>