title: Detect if running from the command line in Laravel 5
body: <p>I have a use case where we need to modify application flow if the application is being run from the command line via Artisan (migrations, seeds, route:list).</p>
  
  <p>In Laravel 4 this could be done like this:</p>
  
  <pre><code>App::runningInConsole()
  </code></pre>
  
  <p>Is there an equivalent in Laravel 5? </p>
  
  <p>Using the Environment (.env) variables isn't preferred in this case as these commands occasionally need to be run on production (pointing to production resources) and I'd prefer to avoid resorting to duplicate (.env.commandline) files.</p>