title: Laravel 4 routing parameters
body: <p>I am a newbie when it comes to  Laravel and so far really enjoying it. I'm using L4 and would like some help with the routing which I'm still trying to get my head around.</p>
  
  <p>I would like the uri <code>domain.com/{username}</code>
  I can get <code>domain.com/{user_id}</code> and Laravel looks up the user but I cannot seem to use the username as a parameter.</p>
  
  <p>EDIT:</p>
  
  <p>I am using a model for user routing</p>
  
  <pre><code>Route::model('user', 'User');
  </code></pre>
  
  <p>And then trying to route</p>
  
  <pre><code>Route::get('/{user}', 'sampleController@viewUser');
  </code></pre>
  
  <p>Also note that it's after all other routes</p>
  
  <p>Thanks in advance! </p>