public function isFillable($key)
    {
        // File name is always treated as a fillable attribute.
        if ($key === 'fileName') {
            return TRUE;
        }

        // If the key is in the "fillable" array, we can of course assume that it's
        // 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->getFillable())) {
            return TRUE;
        }

        return empty($this->getFillable()) &&
            !Str::startsWith($key, '_');
    }
public function isFillable($key)
    {
        // File name is always treated as a fillable attribute.
        if ($key === 'fileName') {
            return TRUE;
        }

        // If the key is in the "fillable" array, we can of course assume that it's
        // 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->getFillable())) {
            return TRUE;
        }

        return empty($this->getFillable()) &&
            !Str::startsWith($key, '_');
    }
public function isFillable ( $ key ) { // File name is always treated as a fillable attribute. if ( $ key === 'fileName' ) { return TRUE ; } // If the key is in the "fillable" array, we can of course assume that it's // 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 -> getFillable ( ) ) ) { return TRUE ; } return empty ( $ this -> getFillable ( ) ) && ! Str :: startsWith ( $ key , '_' ) ; }
Determine if the given attribute may be mass assigned.

@param  string $key

@return bool
Determine if the given attribute may be mass assigned .