public static function instantiate(AttributeContract $attribute, $value)
    {
        if (! $attribute->supportsValues()) {
            throw new AttributeMustSupportValues();
        }

        return new static([
            'attribute_id' => $attribute->id,
            'value' => $value,
        ]);
    }
public static function instantiate(AttributeContract $attribute, $value)
    {
        if (! $attribute->supportsValues()) {
            throw new AttributeMustSupportValues();
        }

        return new static([
            'attribute_id' => $attribute->id,
            'value' => $value,
        ]);
    }
public static function instantiate ( AttributeContract $ attribute , $ value ) { if ( ! $ attribute -> supportsValues ( ) ) { throw new AttributeMustSupportValues ( ) ; } return new static ( [ 'attribute_id' => $ attribute -> id , 'value' => $ value , ] ) ; }
Instantiates a new attribute value.

@param AttributeContract $attribute
@param string $value
@return AttributeValueContract
Instantiates a new attribute value .