darryldecode / laravelshoppingcart

Shopping Cart Implementation for Laravel Framework
1.33k stars 436 forks source link

Call to undefined method Darryldecode\Cart\Cart::count() #226

Open hadisrjn opened 4 years ago

hadisrjn commented 4 years ago

I'm using laravel 5.8 and when I want to use count it returns undefined method what is th problem?

<table class="shop_table shop_table_responsive table">
        <tbody>
               <tr class="order-total count">
                     <th>تعداد</th>
                          <td>
                               <h6>{{ \Cart::count() }}</h6>
                           </td>
                </tr>
        </tbody>
</table>

Any help would be appreciated! @darryldecode

olimortimer commented 4 years ago

Try Cart::getContent()->count()

frezno commented 4 years ago

What about \Cart::getTotalQuantity()