title: Laravel 4: Two different view pages for a single URI based on auth status
body: <p>I have recently got into developing with Laravel 4 and I had a question about routes.</p>
  
  <p>For '/', I would like to have two different view pages based on the user's auth status.</p>
  
  <p>If a user is logged in and is viewing '/', I would like to show them a view with admin controls and when a user is viewing '/' as a regular user without logging in, I would like to offer a general information view.</p>
  
  <p>To accomplish this, I've been playing around with filter 'auth' and 'guest' but am having no luck.
  // app/routes.php</p>
  
  <pre><code>// route for logged in users
  Route::get('/', array('before' =&gt; 'auth', function()
  {
     return 'logged in!';
  }));
  
  // for normal users without auth
  Route::get('/', function() 
  { 
      return 'not logged in!'; 
  }));
  </code></pre>
  
  <p>The above code works to a point where the as a logged in user, I am able to display the proper response but after logging out, I cannot see the proper response as a regular user.</p>
  
  <p>Perhaps this is something that should be handled in the controller? If someone could point me in the right direction, it would be really helpful.</p>