I've searched a lot on the net how to access the global $_SESSION
array from TWIG template and found this: {{app.session.get('index')}}
, but when I'm calling it, it returns an empty string. I have a $_SESSION['filter']['accounts']
and I'm getting this error when calling {{app.session.get('filter').accounts}}
: Item "accounts" for "" does not exist
. What I'm doing wrong?