returns Handbook all toArray tree self create_tree_recursiv returns dd

1
2
3
4
5
6
7
8
$returns = Handbook::all()->toArray();
$tree = self::create_tree_recursive($returns);
//dd($tree);
return response()->json($tree);