Skip to content
Discussion options

You must be logged in to vote

Hello.

Don't worry, man. I've been working intensively with the package past months, having almost the same issues. That's why it's easy for me to address to them now.

Previously, you already added a mutator for the name field in order to get the original value when there was no translation: #337 (reply in thread)

If it's the same model, that's why you're getting the full JSON instead of the translated name.
I would rename that "raw" response to getRawNameAttribute and append de attribute to the model

protected $appends = ['raw_name'];

May it be the same model of a different one, in order to get the trasnlated name you have to mutate the field properly, like stated in the issue I attached…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@mohjacksi
Comment options

Answer selected by mohjacksi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants