private function purgeUnneeded()
    {
        $clean = array();
        foreach ($this->attributes as $key => $value)
        {
            if (! Str::endsWith($key, '_confirmation') && ! Str::startsWith($key, '_') && ! in_array($key, static::$purgeable))
                $clean[$key] = $value;
        }
        $this->attributes = $clean;
    }
private function purgeUnneeded()
    {
        $clean = array();
        foreach ($this->attributes as $key => $value)
        {
            if (! Str::endsWith($key, '_confirmation') && ! Str::startsWith($key, '_') && ! in_array($key, static::$purgeable))
                $clean[$key] = $value;
        }
        $this->attributes = $clean;
    }
private function purgeUnneeded ( ) { $ clean = array ( ) ; foreach ( $ this -> attributes as $ key => $ value ) { if ( ! Str :: endsWith ( $ key , '_confirmation' ) && ! Str :: startsWith ( $ key , '_' ) && ! in_array ( $ key , static :: $ purgeable ) ) $ clean [ $ key ] = $ value ; } $ this -> attributes = $ clean ; }
Purges unneeded fields by getting rid of all attributes
ending in '_confirmation' or starting with '_'

@return array
Purges unneeded fields by getting rid of all attributes ending in _confirmation or starting with _