我的函数将一个数组返回到laravel刀片页面中的变量,如下所示:
Array ( [id] => 1 [name] => Enterpise [children] => Array ( [0] => Array ( [id] => 2 [name] => name1 [children] => Array ( [0] => Array ( [id] => 5 [name] => name2 [children] => ) [1] => Array ( [id] => 6 [name] => name3 [children] => Array ( [0] => Array ( [id] => 11 [name] => name4 [children] => ) .....
现在我想通过使用像foreach这样的东西在我的页面中打印这些值.考虑到他们的孩子的数字没有被指定,在我的函数内部是不可能的.在刀片上完成对我很重要.我怎样才能做到这一点?