Laravel-Model-Validation
Laravel-Model-Validation copied to clipboard
Serialisation fails due to validator
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