sets function
#49922
Replies: 1 comment
-
for simple solutions we have $attributes you can set, you can also do it in the constructor, nothing wrong with that. There's the boot method. But if we are going to do this, I suggest ditch the |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
i think it would be great to add, sets function, it like casts, but it sets attributes when saving/creating/updating for example, column phone, you can add function to this column in sets function, for example to add + in start of value, so then we don't need to add set and get methods inside the model
Beta Was this translation helpful? Give feedback.
All reactions