I want to store the session to redis in Laravel.
I was do :
- Change the session driver into 'redis'
- Set my redis server
- and then use this code to store $req->session()->put($email, json_encode($user));
The code was run successfully. And it was store to redis. But, I just simply add the code to 1 function.
Why the other function like example testing()/check(), also setex to redis? I don't even put the code into that function.