Support the ongoing development of Laravel.io →
posted 10 years ago
Architecture
Last updated 2 years ago.
0

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');
Last updated 2 years ago.
0

I have a helpers.php file that I throw in the composer classmaps to put stuff like that in.

Last updated 2 years ago.
0

another would be a before filter to use in your routes file

Last updated 2 years ago.
0

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?

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

isomis isomis Joined 7 Jul 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.