@thedesignlog have you tried using:
Auth::id();
auth()->id()
auth()->user()->id
any of this?
https://laravel.com/docs/master/authentication#retrieving-the-authenticated-user
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have followed the documentation on laravel's website but it doesn't seem to help. How can I retrieve logged in user id from session in a controller?
Please or to participate in this conversation.