title: Laravel Store Array in Session
body: <p>I have been having trouble storing an array in session. I am making a shopping cart and it doesn't seem to work.</p>
  
  <pre><code>public function __construct(){
  
    $product = array(1,2,3,4);
    Session::push('cart', $product);
  
  }
  </code></pre>
  
  <p>and then retrieve it in the view like this.</p>
  
  <pre><code>{{Session::get('cart')}}
  </code></pre>
  
  <p>However I keep getting an error like this.</p>
  
  <pre><code>htmlentities() expects parameter 1 to be string, array given
  </code></pre>
  
  <p>Any clues and advice on how to create a shopping cart that stores an array of items.</p>