title: Need to Get data of ID ( received in Array ) from database
body: <p>Good Morning. I am trying to get the data for each BuffaloID which i get in array. From that ID i am trying to get milk record for each buffaloID. But 2nd query give the data for first id only. How can i get the data for each id.</p>
  <p>Query</p>
  <pre><code>     $buffalidforavgmilk     =   Buffalomilkrecord::groupBy('buffaloID')-&gt;get('buffaloID') 
       -&gt;pluck('buffaloID')-&gt;toArray();
  
       array:4 [▼
               0 =&gt; &quot;Buffalo-01&quot;
               1 =&gt; &quot;Buffalo-02&quot;
               2 =&gt; &quot;Buffalo-03&quot;
               3 =&gt; &quot;Buffalo-04&quot;
               ]
  </code></pre>
  <p>When i try below query i received data only for first id</p>
  <pre><code>        $avgbuffalomilk = Buffalomilkrecord::where('buffaloID',$buffalidforavgmilk)-&gt; 
          pluck('totalmilk')-&gt;toArray();
  
          array:5 [▼
                   0 =&gt; &quot;9.00&quot;
                   1 =&gt; &quot;13.00&quot;
                   2 =&gt; &quot;12.00&quot;
                   3 =&gt; &quot;13.00&quot;
                   4 =&gt; &quot;12.00&quot;
                   ]
  </code></pre>
  <p>I hope i describe my problem and where did i make mistake to get data for all ID
  Thanks in Advance</p>