We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c46cb7 commit 99209dcCopy full SHA for 99209dc
src/Utils/Tree.php
@@ -12,7 +12,7 @@ class Tree
12
* @return array
13
* #
14
*/
15
- public static function toTree($data, $primary = 'id', $parent = 'parent_id', $children = 'children')
+ public static function toTree($data = [], $primary = 'id', $parent = 'parent_id', $children = 'children')
16
{
17
if (!isset($data[0][$parent])) {
18
return [];
0 commit comments