Level 29
This should work, but only on routes for which session is initialised.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
I try to detremine if a session in laravel not exist. I do the following request but it doesn't work :
''' if(!Session::has('location')){ ... } '''
How i can check if a laravel session (session::put) is not set ? Thank you
This should work, but only on routes for which session is initialised.
Please or to participate in this conversation.