mtvs_dev
1426
12
General

Laravel 5 session data is not accessible in the app boot process

Posted 4 years ago by mtvs_dev

In Laravel 5, It seems you can't access the session data in a ServiceProvider::boot(), the Session::get() just returns null while the data exists in the session.

In a package ServiceProvider how can I access to the session data?

I think I should hook to an event, is there an event about loading session in laravel 5, if not what event should I use? I want to share a variable in my views.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.