title: How to get currently used Artisan console command name in Laravel 5?
body: <p><strong>Problem / What I've tried:</strong></p>
  
  <p>Getting the currently used controller and action in Laravel 5 is easy (but not as easy as it should be), however I'm stuck with getting the currently used artisan console command.</p>
  
  <p>To fetch the controller name I do this:</p>
  
  <pre><code>$route = Route::getRoutes()-&gt;match(Request::capture());
  $listAction = explode('\\', $route-&gt;getActionName());
  $rawAction = end($listAction);
  // controller name and action in a simple array
  $controllerAndAction = explode('@', $rawAction);
  </code></pre>
  
  <p>But when calling from a console action, it always returns the default index controller's name ("IndexController" or so in Laravel). Does anybody know how to make this ?</p>
  
  <p>By the way I've also worked throught <code>Request::capture()</code> but this still gives no info about the command.</p>