My function returns an array to a variable on the laravel page of the blade server as follows:
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 using something like foreach . Consider that their childrenโs numbers are not indicated, this is impossible to do inside my function. It is important for me to do it in the blade. How can i do this?
arrays php laravel blade treeview
narsis fe
source share