title: Laravel: whereIn with variable
body: <p>I'm trying to collect all the records that belong to the sections that happen to them in the variable $sections. But only those from section 1 pick me up. Any suggestions?</p>
  
  <pre><code>$sections = '1,2,3';
  
  $data = News::where('active', '1')
          -&gt;whereIn('section_id', [$sections])
          -&gt;get();
  </code></pre>
  
  <p>If I substitute $sections in the query for the values, this works, but if I use the variable $sections, It doesn't work.</p>
  
  <p>Thanks.</p>