Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

sdbruder's avatar

weird session problem

I'm having a weird session problem:

Controller code can't 'see' my session, but laravel-debugbar lists it all. still scratching my head on this (its in a separate session of the app under a second auth guard).

0 likes
5 replies
sdbruder's avatar

a Log::info(session('tenant.organisationActive.id')); into my controller method shows me null but debugbar 'sees' what Im looking for:

tenant array:3 [ "organisationActive" => array:63 [ "id" => 6 "uuid" => "f748cca4-d8b6-466d-8c7e-...

SaeedPrez's avatar
Log::info(session('tenant')['organisationActive']['id']);

I have no idea what you're talking about.. what forum is having problems?

sdbruder's avatar

I've found it:

a model method instead of returning a expected array was erroneously returning a un-get()'ed relationship, and that ended being stored in the session.

Please or to participate in this conversation.