LMongo\Eloquent\Model::fill PHP Method

fill() public method

Fill the model with an array of attributes.
public fill ( array $attributes ) : Model
$attributes array
return Model
    public function fill(array $attributes)
    {
        foreach ($attributes as $key => $value) {
            // The developers may choose to place some attributes in the "fillable"
            // array, which means only those attributes may be set through mass
            // assignment to the model, and all others will just be ignored.
            if ($this->isFillable($key)) {
                $this->setAttribute($key, $value);
            } elseif ($this->totallyGuarded()) {
                throw new MassAssignmentException($key);
            }
        }
        return $this;
    }
Model