title: why foreach print just one value in laravel?
body: <p>I have a method:</p>
  
  <pre><code>public function winnerDetails()
  {     
      $winners = DB::table('winners')-&gt;get();   
      //dd($winners);
      foreach ($winners as $winner) {
          $qrMainId = $winner-&gt;qrdetails_id;
      }
     dd($qrMainId);
  }
  </code></pre>
  
  <p><code>dd($winners);</code> returns to value of <code>array</code> but when i use <code>foreach</code> its returns one value. How can i get who value returns with <code>foreach</code> loop?</p>
  
  <p><code>dd($winners)</code> output:</p>
  
  <p><a href="https://i.stack.imgur.com/y2SPU.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y2SPU.jpg" alt="enter image description here"></a></p>
  
  <p>and <code>dd($qrMainId);</code> return one value <code>44</code>. But it should return another value of array <code>35</code>; Thanks in advance.</p>