LMongo\Eloquent\Model::isFillable PHP Method

isFillable() public method

Determine if the given attribute may be mass assigned.
public isFillable ( string $key ) : boolean
$key string
return boolean
    public function isFillable($key)
    {
        if (static::$unguarded) {
            return true;
        }
        // If the key is in the "fillable" array, we can of course assume tha it is
        // a fillable attribute. Otherwise, we will check the guarded array when
        // we need to determine if the attribute is black-listed on the model.
        if (in_array($key, $this->fillable)) {
            return true;
        }
        if ($this->isGuarded($key)) {
            return false;
        }
        return empty($this->fillable) and !starts_with($key, '_');
    }
Model