title: Route Group in Lumen error Call to undefined method Laravel\Lumen\Application::group()
body: <p>I have declared a route group in laravel/lumen like so:</p>
  
  <pre><code>$app-&gt;group(['middleware' =&gt; 'auth'], function () use ($app) {
      $app-&gt;get('/details', 'UserController@details');
  });
  </code></pre>
  
  <p>all contents of route file web.php are like so:</p>
  
  <pre><code>/*
  |--------------------------------------------------------------------------
  | Application Routes
  |--------------------------------------------------------------------------
  |
  | Here is where you can register all of the routes for an application.
  | It is a breeze. Simply tell Lumen the URIs it should respond to
  | and give it the Closure to call when that URI is requested.
  |
  */
  
  $app = app();
  
  $router-&gt;get('/', function () use ($router) {
      return $router-&gt;app-&gt;version();
  });
  
  
  $app-&gt;group(['middleware' =&gt; 'auth'], function () use ($app) {
      $app-&gt;get('/details', 'UserController@details');
  });
  </code></pre>
  
  <p>on making a call to <a href="http://THE_URL/" rel="noreferrer">http://THE_URL/</a></p>
  
  <p>I get an error <code>Call to undefined method Laravel\Lumen\Application::group()</code></p>
  
  <p><a href="https://i.stack.imgur.com/hgw02.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hgw02.png" alt="ERROR"></a></p>
  
  <p>How do I add route group with a middleware ?</p>