Best Way To Append Status Since Custom Attribute Update #110
Unanswered
nickpoulos
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I've just ran into this issue. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Since the update with the custom status attribute, I am no longer able to easily add
status
as an Eloquent Model append.I am currently using Laravel Model Status v1.14.0 and Laravel v9.52x.
I added the new
status_attribute
key in the config file array, which is set to the default value ofstatus
.My model has
status
added in the$appends
class var.Previously, this was all that was needed, and the
status
attribute appears in my calls to$model->toArray()
and$model->toJson()
. In my particular case those calls are done behind the scenes with InertiaJs.However, since the update, the underlying method was removed, so I am now getting the error
Call to undefined method App\Models\Event::getStatusAttribute()
.Is there a new best way to handle status appends going forward? Or is this unintended behavior?
Beta Was this translation helpful? Give feedback.
All reactions