I am a new yii user and am trying to play with yii2. I have a site I am working on and while I develop locally, I like to display my session variables on the screen. Normally I would simply start the session on my index.php page and iterate over the $_SESSION array to display each Key=>Val pair.
How do I do this in Yii2? I have in my web.php file…
‘session’ => [
'name' => 'My Session Name',
'savePath' => '/path/to/save/SESSIONS',
],
as I understand it, the session autostarts? So if I wanted to iterate over the Yii::$app->session component, how would I and where do I put the code if I want it to display on every page? I was thinking the output on main.php?
Thanks in advance for input.