title: laravel Foreach nested
body: <p>I have the following arrays:</p>
  
  <p>Blade code:</p>
  
  <pre class="lang-php prettyprint-override"><code>@foreach($allediensten as $alledienstens)
      @foreach($beschikbaarheid as $beschikbaar)
          @if($beschikbaar-&gt;job_id !== $alledienstens-&gt;id)
              &lt;tr&gt;
                  &lt;td&gt;&lt;input type="checkbox" class="checkbox" value="{{$alledienstens-&gt;id}}" name="checkbox[]" /&gt;&lt;/td&gt;
                  &lt;td id="takenid"&gt;{{$alledienstens-&gt;id}}&lt;/td&gt;
                  &lt;td&gt;{{ \Carbon\Carbon::parse($alledienstens-&gt;date)-&gt;format('d-m-Y')}}&lt;/td&gt;
                  &lt;td&gt;{{ \Carbon\Carbon::parse($alledienstens-&gt;starttijd)-&gt;format('H:i')}}&lt;/td&gt;
                  &lt;td&gt;{{ \Carbon\Carbon::parse($alledienstens-&gt;eindtijd)-&gt;format('H:i')}}&lt;/td&gt;
                  &lt;td&gt;{{$alledienstens-&gt;kamernummer}}&lt;/td&gt;
                  &lt;td&gt;{{$alledienstens-&gt;aantalsurveillanten}}&lt;/td&gt;
                  &lt;td&gt;{{$alledienstens-&gt;locatie}}&lt;/td&gt;
                  &lt;td&gt;{{ \Carbon\Carbon::parse($alledienstens-&gt;beschikbaartot)-&gt;format('d-m-Y H:i')}}&lt;/td&gt;
                  &lt;td&gt;{{ \Carbon\Carbon::parse($alledienstens-&gt;accepttot)-&gt;format('d-m-Y H:i')}}&lt;/td&gt;
              &lt;/tr&gt;
          @endif
      @endforeach
  @endforeach
  </code></pre>
  
  <p>Array:</p>
  
  <pre class="lang-php prettyprint-override"><code>1: [{"job_id":1},{"job_id":2}]
  
  2: {"id":1,"user_id":3,"vaardigheid":"TDV","taal":"Nederlands","digitaal":"Ja","ervaring":"Meer dan 2 jaar","date":"2019-04-05","type":"Decentraal","starttijd":"19:15:00","eindtijd":"20:15:00","kamernummer":"H1.03","locatie":"test","beschikbaartot":"2019-04-11 00:00:00","accepttot":"2019-04-11 16:43:00","status":"uitgezonden","cronstatus":"beschikbaaropgeven","opmerking":null,"created_at":"2019-04-21 14:39:54","updated_at":"2019-04-21 22:26:28"},
  {"id":2,"user_id":3,"vaardigheid":"TDV","taal":"Nederlands","digitaal":"Ja","ervaring":"Meer dan 2 jaar","date":"2019-04-05","type":"Decentraal","starttijd":"19:15:00","eindtijd":"20:15:00","kamernummer":"H1.03","locatie":"test","beschikbaartot":"2019-04-11 00:00:00","accepttot":"2019-04-11 16:43:00","status":"uitgezonden","cronstatus":"beschikbaaropgeven","opmerking":null,"created_at":"2019-04-21 14:39:54","updated_at":"2019-04-21 22:26:28"},
  {"id":3,"user_id":3,"vaardigheid":"TDV","taal":"Nederlands","digitaal":"Ja","ervaring":"Meer dan 2 jaar","date":"2019-04-05","type":"Decentraal","starttijd":"19:15:00","eindtijd":"20:15:00","kamernummer":"H1.03","locatie":"test","beschikbaartot":"2019-04-11 00:00:00","accepttot":"2019-04-11 16:43:00","status":"uitgezonden","cronstatus":"beschikbaaropgeven","opmerking":null,"created_at":"2019-04-21 14:39:54","updated_at":"2019-04-21 22:26:28"}]
  </code></pre>
  
  <p>Result: this give me the result id 1, 2, 2, 3, 3 is showing.</p>
  
  <p>if looking at the array this must give result: id 3 only.</p>