Reputation: 1523
I try to access data from session, but I don't get anything.
In Controller I use: session()->get('cas_user') ?? "";
, and I get some date.
In Vuejs I try this: this.$session.get('cas_user')
, and I don't get anything.
Also this.$session.exists()
is false.
I have vue-session.
Upvotes: 1
Views: 18570
Reputation: 302
Have you initialized a session before accessing its values (that is why this.$session.exists()
returns false
)?
this.$session.start()
Have you saved something inside the 'cas_user'
key before trying to get it?
this.$session.set('cas_user', value)
You can also try this.$session.getAll()
to see if ther is some data saved in the session.
Upvotes: 1