Welcome Guest, Not a member yet? Register   Sign In
Session in CI 4 is not working accross the controller
#2

I load it  in the BaseController.

And access it like this using the session helper:

PHP Code:
// Get session value using session helper
$user session('user');
$value session()->get('Item');
$value session('Item');

// Save session value using session helper
session()->set('user'$this->user->id);
session()->set($userData);
session()->setFlashdata('error'lang('Auth.notLoggedIn')); 
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply


Messages In This Thread
RE: Session in CI 4 is not working accross the controller - by InsiteFX - 08-15-2020, 10:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB