protected function fetchColumnValue($data, $columns)
    {
        if (is_string($columns)) {
            return Arr::get($data, $columns);
        }

        if (is_array($columns)) {
            $value = [];
            foreach ($columns as $name => $column) {
                if (!Arr::has($data, $column)) {
                    continue;
                }
                $value[$name] = Arr::get($data, $column);
            }

            return $value;
        }
    }
protected function fetchColumnValue($data, $columns)
    {
        if (is_string($columns)) {
            return Arr::get($data, $columns);
        }

        if (is_array($columns)) {
            $value = [];
            foreach ($columns as $name => $column) {
                if (!Arr::has($data, $column)) {
                    continue;
                }
                $value[$name] = Arr::get($data, $column);
            }

            return $value;
        }
    }
protected function fetchColumnValue ( $ data , $ columns ) { if ( is_string ( $ columns ) ) { return Arr :: get ( $ data , $ columns ) ; } if ( is_array ( $ columns ) ) { $ value = [ ] ; foreach ( $ columns as $ name => $ column ) { if ( ! Arr :: has ( $ data , $ column ) ) { continue ; } $ value [ $ name ] = Arr :: get ( $ data , $ column ) ; } return $ value ; } }
Fetch value in input data by column name.

@param array        $data
@param string|array $columns

@return array|mixed
Fetch value in input data by column name .