Level 104
Sounds like it is maybe a job for a View Composer.
1 like
In my application, I want to create a function that will contain some basic tasks to be executed before presenting data in the app views. I.e. I want every view at its top to have the name of the company which will be no static but will be fetched dynamically from the database. Obviously I do not want to repeat this query analytically in every method in the controllers. I want to call this class, obect or whatever by its name when I need it. Which way can I do it?
Please or to participate in this conversation.