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

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

Puts the specified amount ($quantity) of stock into the specified stock location.
public putToLocation ( integer | float | string $quantity, Model $location, string $reason = '', integer | float | string $cost ) : array
$quantity integer | float | string
$location Illuminate\Database\Eloquent\Model
$reason string
$cost integer | float | string
Результат array
    public function putToLocation($quantity, Model $location, $reason = '', $cost = 0)
    {
        $stock = $this->getStockFromLocation($location);
        if ($stock && $stock->put($quantity, $reason, $cost)) {
            return $this;
        }
        return false;
    }