Hi all,
I am new to CI4 I am trying to access the session in view but I am getting an error saying Undefined property: CodeIgniter\View\View::$session,
I have created one default controller by extending BaseController and have initialized the session as below
$this->session = \Config\Services :: session();
so the $this->session is accessible to the controller but not on the view. however, the $_SESSION is working fine on the view.
and the same case with flashdata it is working in controllers but not on the view
Please help me!...
Thank you.
I am new to CI4 I am trying to access the session in view but I am getting an error saying Undefined property: CodeIgniter\View\View::$session,
I have created one default controller by extending BaseController and have initialized the session as below
$this->session = \Config\Services :: session();
so the $this->session is accessible to the controller but not on the view. however, the $_SESSION is working fine on the view.
and the same case with flashdata it is working in controllers but not on the view
Please help me!...
Thank you.