title: How do you work with sub forms in Laravel 4
body: <p>I'm trying to find the way laravel 4 works with array data in requests but can't find any example, tutorials, documentation about it on the net.</p>
  
  <p>Example:</p>
  
  <pre><code>&lt;select name="productDetails[0][service]"&gt;...&lt;/select&gt;
  &lt;select name="productDetails[0][product]"&gt;...&lt;/select&gt;
  &lt;select name="productDetails[0][action]"&gt;...&lt;/select&gt;
  &lt;select name="productDetails[1][service]"&gt;...&lt;/select&gt;
  &lt;select name="productDetails[1][product]"&gt;...&lt;/select&gt;
  &lt;select name="productDetails[1][action]"&gt;...&lt;/select&gt;
  </code></pre>
  
  <p>Ends up being:</p>
  
  <pre><code>$_GET['productDetails'][0]['service']
  $_GET['productDetails'][0]['product']
  $_GET['productDetails'][0]['action']
  $_GET['productDetails'][1]['service']
  $_GET['productDetails'][1]['product']
  $_GET['productDetails'][1]['action']
  </code></pre>
  
  <p>Now if i want to make my form work correctly i have the read this data, but i can't assume that productDetails is an array and features 0. I want to use the facilities provided by Laravel/Symfony's HTTP Foundation components.</p>
  
  <p>I tried without avail:</p>
  
  <pre><code>Request::get('productDetails.0.service', null); //Doesn't work
  Request::get('productDetails[0][service]', null); //Doesn't work
  Request::get('productDetails.1.service', null); //Doesn't work
  Request::get('productDetails[1][service]', null); //Doesn't work
  </code></pre>
  
  <p>I thought these versions would work because you can access session, config and probably many other data sources like this. Just stumped that this doesn't work... On the other hand, this following snippet works, but it's ugly cause you can't assume productDetails is an array at all times, you also can't assume 0 index exists nor "service" index too...</p>
  
  <pre><code>Request::get('productDetails', array())[0]['service']; //Works but ugly
  Request::get('productDetails', array())[1]['service']; //Works but ugly
  </code></pre>
  
  <p>So what is the right way to accomplish this?</p>
  
  <hr>
  
  <p><strong>Edit #1</strong></p>
  
  <p>Added symfony to the tags, and i realize now that the Request object from Laravel really is an HTTPFoundation from symfony, so how do these guys work with all this? Am i the only one? I'm sure it's just a matter of naming conventions, i might not be using the right terms to search my documentation</p>