Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how Configure::write works in cakePHP

Tags:

php

cakephp

I want to understand how Configure::write('Config.language','fre'), do I have to call this function in beforFilter() methode ? when i call it does it save the the configuration in session or it does not save at all ?

like image 826
Ayoub M. Avatar asked Apr 25 '26 08:04

Ayoub M.


1 Answers

Configure::write() is really just for setting CakePHP configuration directives. You don't want to use it to write to the session (in fact, it just flat out doesn't do that). Chances are good that you're barking up the wrong tree if you're trying to use it. If it's saving state between requests that you want, check out the Session component at http://book.cakephp.org/view/173/Sessions

like image 111
Travis Leleu Avatar answered Apr 28 '26 08:04

Travis Leleu