If it is tied to specific views than view composers are good choice.
I usually create new folder in app folder and add it to composer autoload PSR-4. Than controllers handles requests, but they are more like bosses, they only say other libraries, repositories what to do and is not concerned about how they will do that. So i can easy access the same logics from every where of my app (usually from controllers).
I wrote some stuff down that might help you
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community