app/Processors/Inventory/InventoryVariantProcessor.php
public function store(InventoryRequest $request, $itemId)
    {
        $item = $this->inventory->findOrFail($itemId);

        $variant = $item->newVariant();

        $variant->name = $request->input('name', $item->name);
        $variant->category_id = $request->input('category', $item->category_id);
        $variant->metric_id = $request->input('metric', $item->metric_id);

        return $variant->save();
    }
public function store(InventoryRequest $request, $itemId)
    {
        $item = $this->inventory->findOrFail($itemId);

        $variant = $item->newVariant();

        $variant->name = $request->input('name', $item->name);
        $variant->category_id = $request->input('category', $item->category_id);
        $variant->metric_id = $request->input('metric', $item->metric_id);

        return $variant->save();
    }
Creates a variant of the specified inventory item.

@param InventoryRequest $request
@param int|string       $itemId

@return bool