title: Send Cart::content to the blade in Laravel 5.8
body: <p>I'm using<br/> "bumbummen99/shoppingcart": "^2.8",<br/>
  In laravel 5.8<br/>
  Help me to send my cart::content to the blade template.<br/></p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>//ShoppingController.php
  Mail::send('emails.ordermail-customer-response',
         array(
              'cartcontent' =&gt; Cart::content()
  ), function($message) use ($request)</code></pre>
  </div>
  </div>
  </p>
  
  <p>When I'm sending Cart::content to the e-mail blade template, everything works great</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code> @foreach ($cartcontent as $item)
   
   {{$item-&gt;name}}
   
   {{$item-&gt;price}}
   
   @endforeach</code></pre>
  </div>
  </div>
  </p>
  
  <p>But when I'm saving cart content to my database like this</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>///shoppingcontroller.php
  
  $order = Orders::create([
  
              'cartcontent' =&gt; Cart::content()
   ]);</code></pre>
  </div>
  </div>
  
  In my database I have a string</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>{"76074528274137cc4af420551cfac36a":{"rowId":"76074528274137cc4af420551cfac36a",
  "id":9,"name":"product","qty":"1",
  "price":382,"weight":0,"options":{"color":"black","variant":null,"deliveryprice":"40",
  "qtyinOnePocket":"1"},
  "discount":0,"tax":0,"subtotal":382}}</code></pre>
  </div>
  </div>
  </p>
  
  <p>Than I' trying to send the data from database to my blade template </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>//shoppingcontroller.php
  
  public function showSingleOrder($orderId)
      {
  
          $order = Orders::find($orderId);
  
          return view('admin.sections.orders.ordersingle')
          -&gt;with('order', $order);
  
      }</code></pre>
  </div>
  </div>
  </p>
  
  <p>And here is my blade</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>////ordersingle.blade.php
  
  {{$order-&gt;cartcontent}}</code></pre>
  </div>
  </div>
  </p>
  
  <p>Gives me this </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>{"76074528274137cc4af420551cfac36a":{"rowId":"76074528274137cc4af420551cfac36a",
  "id":9,"name":"product","qty":"1",
  "price":382,"weight":0,"options":{"color":"black","variant":null,"deliveryprice":"40",
  "qtyinOnePocket":"1"},
  "discount":0,"tax":0,"subtotal":382}}</code></pre>
  </div>
  </div>
  </p>
  
  <p>But when I'm using foreach in my blade like this</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>//ordersingle.blade
  
  @foreach($order-&gt;cartcontent as $item)
        {{$item-&gt;price}}
  @endforeach</code></pre>
  </div>
  </div>
  </p>
  
  <p>I don't recieve the price but an error</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Invalid argument supplied for foreach()</code></pre>
  </div>
  </div>
  </p>