moltin / laravel-cart

Laravel Facade and Service Provider for Moltin\Cart
276 stars 87 forks source link

Missing Method getIdentifier() #6

Closed mybigman closed 9 years ago

mybigman commented 11 years ago

First let me say this cart seems pretty cool only just installed it for a project we are working on and hopefully it will fit the bill :)

The below method fails when called as its not in the moltin/cart itself.

public function getIdentifier() { return $this->identifier; }

rained23 commented 10 years ago

You can access each of the item identifier by using $item->identifier

as example

foreach(Cart::contents() as $item):
            echo $item->identifier;
endforeach;