LukePOLO\LaraCart\CartSubItem::getHash PHP Method

getHash() public method

Gets the hash for the item.
public getHash ( ) : mixed
return mixed
    public function getHash()
    {
        return $this->itemHash;
    }

Usage Example

Example #1
0
 /**
  * Adds an sub item to a item
  *
  * @param array $subItem
  *
  * @return CartSubItem $itemHash
  */
 public function addSubItem(array $subItem)
 {
     $subItem = new CartSubItem($subItem);
     $this->subItems[$subItem->getHash()] = $subItem;
     $this->generateHash();
     return $subItem;
 }
All Usage Examples Of LukePOLO\LaraCart\CartSubItem::getHash