Open ishosys opened 7 years ago
Hi,
This function on JSON column thows an "array to string conversion error". Can you please fix it?
public static function getNestedList($column, $key = null, $seperator = ' ') { $instance = new static; $key = $key ?: $instance->getKeyName(); $depthColumn = $instance->getDepthColumnName(); $nodes = $instance->newNestedSetQuery()->get()->toArray(); return array_combine(array_map(function($node) use($key) { return $node[$key]; }, $nodes), array_map(function($node) use($seperator, $depthColumn, $column) { return str_repeat($seperator, $node[$depthColumn]) . $node[$column]; }, $nodes)); }
Hi,
This function on JSON column thows an "array to string conversion error". Can you please fix it?