Overtrue\LaravelShoppingCart\Cart::makeRow PHP Method

makeRow() protected method

Make a row item.
protected makeRow ( string $rawId, mixed $id, string $name, integer $qty, float $price, array $attributes = [] ) : Item
$rawId string Raw id.
$id mixed Item id.
$name string Item name.
$qty integer Quantity.
$price float Price.
$attributes array Other attributes.
return Item
    protected function makeRow($rawId, $id, $name, $qty, $price, array $attributes = [])
    {
        return new Item(array_merge(['__raw_id' => $rawId, 'id' => $id, 'name' => $name, 'qty' => $qty, 'price' => $price, 'total' => $qty * $price, '__model' => $this->model], $attributes));
    }