I was wondering how to do a global variable to save me few lines of copy and pasting this lines. Array it probably and put them in one variable instead? I want to use this
The best way i've seen is by using a config file.
In your app -> config folder, you create a new file called (for example settings.php)
app
config
settings.php
Then in your configuration file you just created (settings.php) you could add:
You can then retrieve the config file from your code using:
echo Config::get('settings.foo'); // Will echo bar
echo Config::get('settings.bar'); // Will echo foo