Good Peoples. I have an issue with my project. In the layout blade, I need to fetch some data from the database. But I cannot pass variables as there has no route for the layout blade. It’s just a master blade. Is there any way to make a global variable and use it all blade? Thanks for the valuable replies.
Tag: global-variables
How to declare a global variable in php?
I have code something like this: <? $a="localhost"; function body(){ global $a; echo $a; } function head(){ global $a; echo $a; } function …