Laravel 4.2 subdomain route-parameter
<p>i've setup some subdomains on my localhost using <code>xampp</code>.
this is my subdomain-routes:</p>

<pre><code>    Route::group(['domain' =&gt; '{subdomain}.localhost'], function(){
    Route::get('home',                array('as'=&gt;'sub.home',         'uses'=&gt;'SubdomainController@home')
    Route::get('gallery/{id}',     array('as'=&gt;'sub.gallery',        'uses'=&gt;'SubdomainController@gallery'));
});
</code></pre>

<p>These are my links:</p>

<pre><code>{{ URL::route('sub.home', array($subdomain)) }}
{{ URL::route('sub.gallery', array($subdomain,2)) }}
</code></pre>

<p>The "home-route" works as expected, but whatever i do, the gallery-route parameter "2" is not passed to the method, instead it shows the name of the subdomain.</p>

<p>Can anyone point my to the right direction.</p>

<p><strong>E D I T</strong>
when i add $subdomain to the method, i get the correct $id.
Now the new question is how to do this without injecting the subdomain-param to every method.</p>

<pre><code>public function gallery($subdomain, $id) {
    die($id);//output is now "2"
}
</code></pre>