im_tsm
im_tsm

Reputation: 2051

How to regenerate laravel Session id

I am looking for a way to regenerate laravel session id so that I can change the current session id after logout. I have found that the session id is changed after a successful login. So I am looking something similar to this. What is the solution?

Upvotes: 2

Views: 7262

Answers (1)

Can Celik
Can Celik

Reputation: 2087

Here is that part in laravel documentaion. https://laravel.com/docs/5.2/session

Regenerating The Session ID

If you need to regenerate the session ID, you may use the regenerate method:

$request->session()->regenerate();

Upvotes: 3

Related Questions