title: Pass fixed variable from route to controller in Laravel
body: <p>I'm trying to pass a variable through my route to my controller, but I have multiple routes (categories) leading to the same controller i.e.</p>
  
  <pre><code>Route::get('/category1/{region}/{suburb?}', 'SearchController@search');
  Route::get('/category2/{region}/{suburb?}', 'SearchController@search');
  </code></pre>
  
  <p>Making /category1, 2, etc. to be a parameter /{category} is not an option and I don't want to make separate controller function for each category.</p>
  
  <p>How do I send the first segment of the url to my search controller? i.e. category1 or category2?</p>
  
  <p>At present controller is as follows:</p>
  
  <pre><code>public function search($region, $suburb = null) { }
  </code></pre>
  
  <p>Thanks!</p>