I would put it in
/app/start/global.php
If you want a variable available in all views you can use
View::share('var_name' 'var_value');
I have a helpers.php file that I throw in the composer classmaps to put stuff like that in.
another would be a before filter to use in your routes file
I need to communicate with a api and by every request there will be a domain check. The reason for that is that every domain has its own content. I was thinking about some kind of service that established the connection and doing the check.
Is it not better to make some kind of service provider?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community