title: Laravel 5 Route Group and Basic(/) GET Route within group
body: <p>I am working on a Laravel 5.0 Web application with Admin panel.
  I am facing an issue with Routes. I have Grouped Admin Routes like below,</p>
  
  <pre><code>Route::group(['prefix' =&gt; 'admin', 'namespace' =&gt; 'Admin', 'middleware' =&gt; ['user.admin']], function () {
      Route::get('login', [
          'as' =&gt; 'admin.login',
          'uses' =&gt; 'AuthController@getLogin'
      ]);
      Route::get('logout', [
          'as' =&gt; 'admin.login',
          'uses' =&gt; 'AuthController@getLogout'
      ]);
      Route::post('login', 'AuthController@postLogin');
  });
  
  Route::group(['prefix' =&gt; 'admin', 'namespace' =&gt; 'Admin', 'middleware' =&gt; ['user.admin','auth', 'admin.acl']], function () {
  
      Route::get('dashboard', [
          'as'         =&gt; 'admin.dashboard',
          'uses'       =&gt; 'DashboardController@index',
          'permission' =&gt; 'admin_dashboard'
      ]);
  
      //Image Handler
      Route::get('images/{size}/{name?}',[
          'as'   =&gt; 'admin.images',
          'uses' =&gt; 'ImagesController@images'
      ]);
  
      Route::resource('user', 'UsersController');
  
      ........   
  
  });
  </code></pre>
  
  <p>Things are working fine. I can use following without any problem,</p>
  
  <pre><code>http://domain.com/admin/dashboard
  http://domain.com/admin/login
  </code></pre>
  
  <p>But I want </p>
  
  <pre><code>http://domain.com/admin
  </code></pre>
  
  <p>to display login page or redirect to </p>
  
  <pre><code>http://domain.com/admin/login
  </code></pre>
  
  <p>so I changed my first group to following,</p>
  
  <pre><code>Route::group(['prefix' =&gt; 'admin', 'namespace' =&gt; 'Admin', 'middleware' =&gt; ['user.admin']], function () {
  
      Route::get('/', [        
          'uses' =&gt; 'AuthController@getLogin'
      ]);
      Route::get('login', [
          'as' =&gt; 'admin.login',
          'uses' =&gt; 'AuthController@getLogin'
      ]);
      Route::get('logout', [
          'as' =&gt; 'admin.login',
          'uses' =&gt; 'AuthController@getLogout'
      ]);
      Route::post('login', 'AuthController@postLogin');
  });
  </code></pre>
  
  <p>Now When I access </p>
  
  <pre><code>http://domain.com/admin
  </code></pre>
  
  <p>I get 'This webpage has a redirect loop' in chrome. Is it possible in Route group? if not how to do this with .htaccess?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Below is the <code>handle</code> method of a Middleware <code>user.admin</code>. Which does nothing but changes underlying model for authentication.</p>
  
  <pre><code>    public function handle($request, Closure $next)
      {
          \Config::set('auth.table', 'admins');
          \Config::set('auth.model', 'App\DB\Admin\Admin');
  
          \Config::set('session.cookie', 'admin_session');
          \Config::set('session.path', '/admin/');
  
          return $next($request);
      }
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>This is amazing, following works</p>
  
  <pre><code>http://domain.com/index.php/admin
  </code></pre>
  
  <p>I have not touched default <code>.htaccess</code> supplied by laravel 5.0, which is below,</p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      &lt;IfModule mod_negotiation.c&gt;
          Options -MultiViews
      &lt;/IfModule&gt;
  
      RewriteEngine On
  
      # Redirect Trailing Slashes...
      RewriteRule ^(.*)/$ /$1 [L,R=301]
  
      # Handle Front Controller...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>I have almost 60-70 routes, and all of them works without <code>index.php</code> accept in above scenario I needed <code>index.php</code>.</p>