I refactored to use methods already on the model to make this package's code simpler.
It's basically what \Illuminate\Database\Eloquent\Concerns\HasAttributes::transformModelValue does but just the casts part. Wasn't sure if there would ever be casts defined on the model, so that's why I saved/restored it in the new code.
Fixes #85
I refactored to use methods already on the model to make this package's code simpler. It's basically what
\Illuminate\Database\Eloquent\Concerns\HasAttributes::transformModelValue
does but just the casts part. Wasn't sure if there would ever be casts defined on the model, so that's why I saved/restored it in the new code.