https://laravel.com/docs/5.6/session
http://php.net/manual/en/features.sessions.php
Edit: you have to read the whole page read down about the global session helper it's all there in the docs.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
For all request objects, there is always the possibility to access session variables using $request->session()...
However, it is also possible to access same via Session::...
While the later is very much convenient, it is not documented anywhere. At least not in the official page https://laravel.com/docs/5.6/session
Why is this so? Is it that accessing session variables using this particular undocumented means is not safe futuristically?
Really, probably only about 30-40% of laravel is documented in the main docs, for the most widely used functions. If you want the full documentation, look at the api docs. Look in the "Prologue" section on the top-left for "API Documentation" when on the main docs page.
Also, Laravel uses a lot of other components from Symfony and extends them. So you'd want to look in the Symfony docs for the full docs on those classes. Laravel will only document what they added/extended, but not the methods/functions of the base classes they extended.
Please or to participate in this conversation.