You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quite often, it's required only to add few more fields to the array created from the model. Instead of overwriting the toArray() method, JsonResource should copy the same pattern used in Eloquent Models.
JsonResource should support the $appends array and use it to call methods following the accessor pattern (i.e., full_name append, should call the getFullNameAttribute() method).
Quite often, it's required only to add few more fields to the array created from the model. Instead of overwriting the
toArray()
method,JsonResource
should copy the same pattern used in Eloquent Models.JsonResource
should support the$appends
array and use it to call methods following the accessor pattern (i.e.,full_name
append, should call thegetFullNameAttribute()
method).Depends on #1
The text was updated successfully, but these errors were encountered: