Take the example of a model with a firstName
and lastName
.
I know I can add a getFullName
method to the model, and $model->fullName
will run through the getter.
However, I'd like the attribute to also remain part of the model (accessible through $model->attributes), which if I use the getter, it isn't.
If I use the getter AND include the same name in defineAttributes
, the getter is ignored.
Is there a way to achieve this?