Set a given attribute on the model.

@param  string $key
@param  mixed $value
@return $this
17774
public function setAttribute($key, $value)
    {
        if (isset($this->mutations[$key]))
        {
            unset($this->mutations[$key]);
        }

        return parent::setAttribute($key, $value);
    }
871332
public function setAttribute($key, $value)
    {
        // check if it's a enum
        if (isset($this->enums[$key]) && is_scalar($value)) {
            $enumClass = $this->enums[$key];
            $this->attributes[$key] = new $enumClass($value);
        } else {
            parent::setAttribute($key, $value);
        }
        return $this;
    }
8792
public function setAttribute($attribute, $value){
        if($attribute === 'table'){
            $this->_table = $value;
        }
        elseif($attribute === 'pk'){
            $this->_pk = $value;
        }
        elseif($attribute === 'relations'){
            $this->_relations = $value;
        }
        
        return $this;
    }
1235721
public function setAttribute($key, $value)
    {
        if (in_array($key, $this->getTranslatable())) {
            $translation = $this->translateOrNew($this->getLocale());

            $translation->$key = $value;

            $this->translationCache[$this->getLocale()] = $translation;

            return $translation;
        }

        return parent::setAttribute($key, $value);
    }
780336
public function set($key, $value) {
        if (is_array($key)) {
            $this->data = array_merge($this->data, $key);
        } else {
            $this->data[ $key ] = $value;
        }
        return $this;
    }
899005
protected function setConfig($value, $key)
    {
        $setter = 'set' . ucfirst($key);

        if (method_exists($this, $setter)) {
            $this->$setter($value);
        } elseif (property_exists($this, $key)) {
            $this->$key = $value;
        }

        return $this;
    }
161056
public function addAttribute($key, $value = true)
    {
        if ($value === null) {
            return $this;
        }
        $this->attributes[$key] = $value;

        return $this;
    }
470713
public function set( $key, $value ) {
		$key = $this->addKeyprefixIfNeeded( $key );
		$this->params[$key] = $value;
		return $this;
	}
617764
public function set_attribute( $key, $value ) {
		$this->attributes[ $key ] = $this->sanitize_attribute( $key, $value );

		return $this;
	}
1076593
public function setParameter($key, $value)
    {
        if (!$this->parameters) {
            $this->parameters = array();
        }

        $this->parameters[$key] = $value;

        return $this;
    }
974514
public function setAttribute($key, $value)
    {
        // First we will check for the presence of a mutator for the set operation
        // which simply lets the developers tweak the attribute as it is set on
        // the model, such as "json_encoding" an listing of data for storage.
        if ($this->hasSetMutator($key)) {
            $method = 'set'.Str::studly($key).'Attribute';

            return $this->{$method}($value);
        }

        // Get the method that modifies this value before storing.
        $method = $this->getCastToMethod($key);

        // Casting method is local.
        if (is_string($method) && method_exists($this, $method)) {
            $value = $this->$method($key, $value);
        }

        // If this attribute contains a JSON ->, we'll set the proper value in the
        // attribute's underlying array. This takes care of properly nesting an
        // attribute in the array's value in the case of deeply nested items.
        if (Str::contains($key, '->')) {
            return $this->fillJsonAttribute($key, $value);
        }

        $this->attributes[$key] = $value;

        return $this;
    }
599236
public function with($key, $value = null)
    {
        if (is_array($key)) {
            $this->attributes = array_merge($this->attributes, $key);
        } else {
            $this->attributes[$key] = $value;
        }

        return $this;
    }
1323784
protected function setParameter($key, $value)
    {
        if (is_array($value) && isset($value['value'])) {
            $value = $value['value'];
        }

        $this->parameters->set($key, $value);

        return $this;
    }
697536
public function setAttribute($key, $value)
	{
		if ($value instanceof BaseModel || $value instanceof Collection)
			$this->setRelationship($value, $key);
		elseif ( !is_array($value))
			$this->attributes[$key] = $value;
		else
			$this->setRelationship($value, $key);
	}
757170
public function setAttribute($key, $value)
    {
        if (in_array($key, $this->autofillRelationships)) {
            $this->autofilledRelations[camel_case($key)] = $value;
            return $this;
        } else {
            return parent::setAttribute($key, $value);
        }
    }
1171607
public function setAttribute($key, $value)
    {
        return ( ! $this->isTranslatableAttribute($key) || is_array($value))
            ? parent::setAttribute($key, $value)
            : $this->setTranslation($key, $this->getLocale(), $value);
    }
40775
public function setAttribute($key, $value)
    {
        if ( ! $this->isTranslatableAttribute($key)) {
            return parent::setAttribute($key, $value);
        }

        foreach ((array) $value as $locale => $translation) {
            $locale = is_string($locale) ? $locale : null;
            $this->setTranslation($key, $translation, $locale);
        }

        return $this;
    }