Stevebauman\Inventory\Traits\InventoryTrait::putToManyLocations PHP Метод

putToManyLocations() публичный Метод

Puts the specified amount ($quantity) of stock into the specified stock locations.
public putToManyLocations ( integer | float | string $quantity, array $locations = [], string $reason = '', integer | float | string $cost ) : array
$quantity integer | float | string
$locations array
$reason string
$cost integer | float | string
Результат array
    public function putToManyLocations($quantity, $locations = [], $reason = '', $cost = 0)
    {
        $stocks = [];
        foreach ($locations as $location) {
            $stock = $this->getStockFromLocation($location);
            $stocks[] = $stock->put($quantity, $reason, $cost);
        }
        return $stocks;
    }