protected function cleanArray(array $data, $keyPrefix = '')
    {
        return collect($data)->map(function ($value, $key) use ($keyPrefix) {
            return $this->cleanValue($keyPrefix.$key, $value);
        })->all();
    }
protected function cleanArray(array $data, $keyPrefix = '')
    {
        return collect($data)->map(function ($value, $key) use ($keyPrefix) {
            return $this->cleanValue($keyPrefix.$key, $value);
        })->all();
    }
protected function cleanArray ( array $ data , $ keyPrefix = '' ) { return collect ( $ data ) -> map ( function ( $ value , $ key ) use ( $ keyPrefix ) { return $ this -> cleanValue ( $ keyPrefix . $ key , $ value ) ; } ) -> all ( ) ; }
Clean the data in the given array.

@param  array  $data
@param  string  $keyPrefix
@return array
Clean the data in the given array .