title: Laravel 5 Invalid argument supplied for foreach()
body: <p>I'm trying to do a <code>foreach()</code> inside of one of my controller and I'm running into the error of <code>Invalid argument supplied for foreach()</code> this is my code</p>
  
  <pre><code>$subAdmins = $request-&gt;input('subAdmin');
  
    // Adding subAdmin
    foreach($subAdmins as $subAdmin){
      $linksubAdmin = new LayMinisterEvents;
      $linksubAdmin-&gt;user_id = $subAdmin;
      $linksubAdmin-&gt;event_id = $recordEvent-&gt;id;
      $linksubAdmin-&gt;save();
   }
  </code></pre>
  
  <p>This is the data that is getting sent over <code>'subAdmins' =&gt; '5,6'</code></p>
  
  <pre><code>at HandleExceptions-&gt;handleError(2, 'Invalid argument supplied for 
  foreach()', '/home/vagrant/www/project-
  api/app/Http/Controllers/EventsController.php', 47, array('request' =&gt; 
  object(Request), 'response' =&gt; object(Response), 'authUser' =&gt; 1, 
  'recordEvent' =&gt; object(Events), 'linkadminLeader' =&gt; 
  object(AdminEvent), 'subAdmins' =&gt; '5,6'))
  in EventsController.php (line 47)
  </code></pre>