Answer the question
In order to leave comments, you need to log in
How to correctly pass a variable in laravel to all templates?
I don't understand the documentation on this point. There are a lot of solutions and not a single detailed one. A banal problem: a record from the database is displayed in the footer file. The whole template is built on blade. So, there are many pages on the site, but there is only one footer. How is it easier and more correct to get this record from the database once and so that it is transferred to the footer, regardless of which page on the site is open?
Answer the question
In order to leave comments, you need to log in
To do this, use the view composer https://scotch.io/tutorials/sharing-data-between-v...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question