Level 14
$request->user()->id or auth()->id()
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I've seen this here:
https://stackoverflow.com/questions/16812747/how-can-i-get-the-session-id-in-laravel
$session_id = Session::getId();
It works to get the session ID, but not the session USER ID.
Please or to participate in this conversation.