Home Top Ad

[resolved] How to read and write Session in Cakephp 3.0

Share:

How to read and write Session in Cakephp 3.0

You need to set $session :
$session = $this->request->session();
$session->write('Config.language', 'eng'); 
$session->read('Config.language');
And then you'll be able to read and write in your session
Or you can directly read and write :
$this->request->session()->write('Config.language', 'eng');
$this->request->session()->read('Config.language');

Aucun commentaire