CodeIgniter Forums

Full Version: Session Library
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Codeigniter noob here: I'm trying to find how I can load the session library at app run since I plan on using several session variables throughout. I'm sure I am missing something. Can anyone point me to the right place?
Thanks.
CodeIgniter version?
(07-22-2020, 12:20 PM)jreklund Wrote: [ -> ]CodeIgniter version?
4.0.4 (sorry)
Then you can just open up /app/Controllers/BaseController.php and uncomment:
Code:
// $this->session = \Config\Services::session();

And you can access it with $this->session in your controllers.
(07-22-2020, 12:24 PM)jreklund Wrote: [ -> ]Then you can just open up /app/Controllers/BaseController.php and uncomment:
Code:
// $this->session = \Config\Services::session();

And you can access it with $this->session in your controllers.
Smile Right on! Thanks!