Laravel-Model-Validation icon indicating copy to clipboard operation
Laravel-Model-Validation copied to clipboard

Serialisation fails due to validator

Open Feijs opened this issue 9 years ago • 0 comments

Caching a collection of models which extend from Way\Database\Model produces the following exception: Serialization of 'Closure' is not allowed

This closure seems to be included in the validator factory instance.

This commit fixes the issue. The disadvantage is that any custom Validator will be replaced by the global app validator.

Another option would be to use the super_closure package and override the (un)serialize functions

Feijs avatar Jun 25 '15 13:06 Feijs