use the mutator hooks instead of getAttribute() (so $model->toArray() is cast as well)