Using logAttribute name as alias? #710
-
Is this possible? or is there any alternative way for it?
|
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
You can actually do it inside tapActivity() but having something like that in your example above would be much cleaner. |
Beta Was this translation helpful? Give feedback.
-
Hey, Could you explain why you would like to alias your model attributes in the log? I can't imagine any case why the log should have aliased attributes. 🤔 |
Beta Was this translation helpful? Give feedback.
-
Hi. I'm thinking that he may want to rename related attributes for example instead of client.name: Anderson M. Anderson he may just want it to be client: Anderson M. Anderson |
Beta Was this translation helpful? Give feedback.
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
In this case I would do this mapping where it belongs to - in the frontend. For example via translations to support multiple languages. |
Beta Was this translation helpful? Give feedback.
-
Save using db fields and map the data when the user wants to see the changes. |
Beta Was this translation helpful? Give feedback.
-
Thanks |
Beta Was this translation helpful? Give feedback.
Hey,
that's not possible - except the mentioned
tapActivity()
method and map the array by your own.Right now I would also say that this is a feature that won't happen - because of a massive increase in complexity without a common usecase.
Could you explain why you would like to alias your model attributes in the log? I can't imagine any case why the log should have aliased attributes. 🤔