I am trying to save a class object into session but somehow it is throwing the "Serialization of \'Closure\' is not allowed" error.
What can I do to fix it?