Level 6
Stolen the answer from here: https://laracasts.com/discuss/channels/laravel/get-session-by-session-id?page=1
\Crypt::decrypt(\Request::cookie(config('session.cookie')))
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi,
I am using database as a session driver. After succesfully login, I want value of 'id' column of session table for current logged in session?
Thank you.
Please or to participate in this conversation.