We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

How to set global session variables in Phalcon, values retrieved from database upon entry to the site?

Hi,

I want to set global session variables where the values are retrieved from the database, in Phalcon upon entry to the site (ie. get site settings - site name etc). What would be the best way to achieve this so this data is retrieved only once and remains in session accessible to views.

Thanks



6.6k

Thanks, this looks like what I need. :)