after reading ‘What is the best way to create global variables in CakePHP?’ in stackoverflow, I tried to configure my school’s email id as follows:
Configure::write('School.email','support@merryflowers.com')
but I don’t know on where to place the above code in app_controller so that it is accessible to all models, views and controllers. Can someone help me?
thank you.
Placing such constants in bootstrap.php or core.php is advised. Both of these files are located in
app/config/.I personally think bootstrap.php is cleaner.