protected function purgeAttributes()
    {
        $attributes = $this->getPurgeAttributes();

        if ( ! empty($attributes) )
        {
            foreach ( $attributes as $attribute )
            {
                unset($this->attributes[$attribute]);
            }
        }
    }
protected function purgeAttributes()
    {
        $attributes = $this->getPurgeAttributes();

        if ( ! empty($attributes) )
        {
            foreach ( $attributes as $attribute )
            {
                unset($this->attributes[$attribute]);
            }
        }
    }
protected function purgeAttributes ( ) { $ attributes = $ this -> getPurgeAttributes ( ) ; if ( ! empty ( $ attributes ) ) { foreach ( $ attributes as $ attribute ) { unset ( $ this -> attributes [ $ attribute ] ) ; } } }
Purge the attributes that are not a field on the database table to prevent error during the save
Purge the attributes that are not a field on the database table to prevent error during the save