title: Conditional Routing based on the current executing environment in Laravel 4
body: <p>I want to setup up a separate routing based on the environment setup on my Laravel 4 application. Would I be able to detect the current executing environment on my routes.php and set the routing of my application?</p>
  
  <p>I want to be able to point multiple domains to a single Laravel application, but load different views based on the domain that is being visited. The following is a sample routing that I am looking at.</p>
  
  <pre><code>/app/routes.php
  
  //All Domains
  Route::get('/admin',array('as' =&gt; 'loadDashboard', 'uses'=&gt;'AdminController@loadDashboard'));
  
  //If Domain 1
  Route::get('/user',array('as' =&gt; 'checkLogin', 'uses'=&gt;'Site1Controller@loadDashboard'));
  
  //If Domain 2
  Route::get('/user',array('as' =&gt; 'checkLogin', 'uses'=&gt;'Site2Controller@loadDashboard'));
  
  //If Domain 3
  Route::get('/user',array('as' =&gt; 'checkLogin', 'uses'=&gt;'Site3Controller@loadDashboard'));
  </code></pre>