1. If you need to use that variable in controllers then you can set it in
the beforeFilter and if you need to access the variable in views then
beforeRender both you have to do in AppController.
2. Please follow this http://book.cakephp.org/3.0/en/views.html
On Thursday, March 17, 2016 at
*1. How to set a variable and use everywhere?*
*2.How to send a variable to Layout and Element?*
--
Sign up for our Newsletter for updates.
http://cakephp.org/newsletter/signup
We will soon be closing this Google Group. But don't worry, we have something
better coming. Stay tuned for an