title: Laravel - Setting Checked Property of Checkbox From Returned Array Input
body: <p>I'm having a problem where I'm trying to handle a </p>
  
  <pre><code>return Redirect::to('page')-&gt;withInput();
  </code></pre>
  
  <p>call while using an array of checkboxes. Basically, if my validator fails, I want to return back, display some errors and repopulate inputs with their value. Here are the inputs I'm having difficulty with.</p>
  
  <pre><code>&lt;div class="row"&gt;
    &lt;div class="col-xs-12"&gt;
      &lt;label class="checkbox-inline"&gt;
        &lt;input type="checkbox" name="rms_cs[]" value="Marshall and Swift Property Valuation" {{ (Input::old("rms_cs[]") == "Marshall and Swift Property Valuation") ? "checked":"" }}&gt; Marshall &amp;amp; Swift Property Valuation
      &lt;/label&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="row"&gt;
    &lt;div class="col-xs-12"&gt;
      &lt;label class="checkbox-inline"&gt;
        &lt;input type="checkbox" name="rms_cs[]" value="Premises Liability Survey" {{ (Input::old("rms_cs[]") == "Premises Liability Survey") ? "checked":"" }}&gt; Premises Liability Survey
      &lt;/label&gt;
    &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>So, basically, I have multiple checkboxes, each with <code>name="rms_cs[]"</code> and <code>value="something"</code>. How would I go about setting the checked property to <code>checked</code> when Input is returned? </p>
  
  <p>Note: I have lots of text boxes and radio buttons that work fine, so I know that the issue doesn't lie with anything besides <code>Input::old("rms_cs[]")</code>. I think the issue is that <code>rms_cs[]</code> is an indexed array; ie <code>rms_cs[0] = "Something"</code> and not <code>rms_cs["Premises Liability Survey"] = "Something"</code></p>
  
  <p>If anyone could shed some light on this/provide a better way to handle something like this, that would be great.</p>