title: How to pass Checkbox value 0 if not checked and 1 if checked using array laravel
body: <p>I have form with checkbox</p>
  
  <pre><code>   @foreach($accounts as $acc)
           &lt;input type="checkbox" value="1" name="account[{{ $acc-&gt;id }}]" @if($acc-&gt;published) checked @endif&gt;
     @endforeach
  </code></pre>
  
  <p>How I can pass 0 value when checkbox is not checked?</p>
  
  <p>My controller:</p>
  
  <pre><code>public function updateMon(Request $request) {
      $request-&gt;validate([
          'account' =&gt; 'required|array',
          'account.*' =&gt; 'integer'
      ]);
  
      foreach($account as $acc =&gt; $val) {
          dd($val); //how get 0?
      }
  }
  </code></pre>