title: Indirect modification of overloaded element of Illuminate\Support\Collection has no effect
body: <p>im quite new in laravel framework, and im from codeigniter.</p>
  
  <p>I would like to add new key and value from database </p>
  
  <pre><code>static function m_get_promotion_banner(){
      $query = DB::table("promotion_banner")
          -&gt;select('promotion_banner_id','promotion_link','about_promotion')
          -&gt;where('promotion_active','1')
          -&gt;get();
      if($query != null){
          foreach ($query as $key =&gt; $row){
              $query[$key]['promotion_image'] = URL::to('home/image/banner/'.$row['promotion_banner_id']);
          }
      }
      return $query;
  }
  </code></pre>
  
  <p>that code was just changed from codeigniter to laravel, since in codeigniter there are no problem in passing a new key and value in <code>foreach</code> statement</p>
  
  <p>but when i tried it in laravel i got this following error :</p>
  
  <blockquote>
    <p>Indirect modification of overloaded element of <code>Illuminate\Support\Collection</code> has no effect</p>
    
    <p>at HandleExceptions->handleError(8, 'Indirect modification of overloaded element of Illuminate\Support\Collection has no effect', 'C:\xampp\htdocs\laravel-site\application\app\models\main\Main_home_m.php', 653, array('query' => object(Collection), 'row' => array('promotion_banner_id' => 1, 'promotion_link' => '<a href="http://localhost/deal/home/voucher" rel="noreferrer">http://localhost/deal/home/voucher</a>', 'about_promotion' => ''), 'key' => 0))</p>
  </blockquote>
  
  <p>please guide me how to fix this</p>
  
  <p>thank you (:</p>