In case anyone sees this and wonders too. I asked in the Laravel GitHub issue tracker and was told that Laravel does not serialize private
members and that the Laravel devs consider this a feature.
To me, you might as well randomly translate integer arguments into array arguments and call it a feature.
I don't understand at all why private
is a 2nd class citizen with respect to serialization. It is actually a useful OOP construct in its own right, especially to ensure that derived classes don't meddle with things they aren't supposed to meddle with.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community