title: Laravel: returning null from input::get()
body: <p>I need a dynamic form, which is created depending on database entries. To input the data into the database, this also needs to be dynamic. For some reason I am getting null in the value of my form.</p>
  
  <p>My form loop</p>
  
  <pre><code>@foreach ($keyAccounts as $keyAccount)
          {{ Form::label($keyAccount-&gt;name, $keyAccount-&gt;name.':', array('class' =&gt; '')) }}
          {{ Form::text($keyAccount-&gt;name)}}&lt;br /&gt;
      @endforeach
  </code></pre>
  
  <p>which returns</p>
  
  <pre><code>&lt;label for="hsbc dad" class=""&gt;hsbc dad:&lt;/label&gt;
          &lt;input name="hsbc dad" type="text" id="hsbc dad"&gt;&lt;br /&gt;
                  &lt;label for="sdsad" class=""&gt;sdsad:&lt;/label&gt;
          &lt;input name="sdsad" type="text" id="sdsad"&gt;&lt;br /&gt;
                  &lt;label for="dfffff" class=""&gt;dfffff:&lt;/label&gt;
          &lt;input name="dfffff" type="text" id="dfffff"&gt;&lt;br /&gt;
  </code></pre>
  
  <p>When my form is submitted it calls on the actions controller and runs the following code</p>
  
  <pre><code>foreach($keyAccounts as $keyAccount){
          $assignedAccount = new AssignedAccount;
          $assignedAccount-&gt;contribution_id = $last_con_id-&gt;contribution_id;
          $assignedAccount-&gt;key_account_id = $keyAccount-&gt;key_account_id; 
          $assignedAccount-&gt;year_to_date = Input::get($keyAccount-&gt;name);
          $assignedAccount-&gt;save();
      }
  </code></pre>
  
  <p>I am getting the year_to_date variable is null in an SQL error, even though the data is filled out.</p>
  
  <p>here is my var_dump of the Input::get()</p>
  
  <pre><code>NULL string(1) "3" string(1) "3"
  </code></pre>
  
  <p>I don;t know why but the first entry is null. There is a total of three entries in the database, and no name variable is null</p>