My function returns an array to a variable in laravel blade page like this :
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] =>
)
.....
Now I want to print these values inside my page by using something like foreach
. Consider that their children's numbers are not specified, it is impossible to do that inside of my function. It is important to me to be done in blade. How can I do that?