Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Phalconphp on what is the best way to use Session Data in the main view

I've been reading the documentation and it is not clear how to use the session data in the main view. Thanks in advance.



48.2k
Accepted
answer

I believe anything in the DI is accessible in the view, so you could do:

{{ session.someValue }}


169

Wait so we can access it like that? I always just set a variable in my BaseController and then access it in the view :/