eloquence
eloquence copied to clipboard
ValidableContract, CleansAttributes fails save when used inside job.
I have been stuck on this annoying bug in a long time and finally realised it was caused by validable.
The problem is when trying to create an model inside a job the eloquence Hookable save()
returns false.
If I however set skipValidation = true
then it passes the save, but saves an empty model, because CleansAttributes just removes everything.
If I however removes the implementation of CleansAttributes and has skipValidation = true
, then I saves the model as intended.
Running Laravel 5.2
I have the same problem. If CleansAttributes interface is used, then nothing is saved on model. It's just empty. Using Laravel 5.3
What was exactly the problem here?
As said in the bug description, When creating a model inside a job, then the save function fails.
It looks like a bug with CleansAttributes.