Not so sure if anything should be persisted anyway inside of a "Service Provider" as it is job is to provide as service to framework, thus I think some core framework classes are not present e.g. session. Guess the question you need to ask is... why am I persisting something to a session from inside a "Service Provider". In my humble opinion nothing of the sort or e.g. session values, database values etc. should be done inside a service provider. Hope that helps.
Oct 8, 2014
1
Level 17
Persisting Session Value
Hi,
My apps broken on the latest build of laravel 5. Basically i have a service provider which set session values and were used throughout the apps.
After the latest changes on laravel/laravel and laravel/framework, the session doesn't persist anymore.
If i set the session anywhere else e.g on the route or controller, it will persist.
It seems like, session values set on service providers got flushed away.
Any thought please?
Please or to participate in this conversation.