Good morning! ☀️🤓

I am rereading the #Laravel documention, which is really good by the way, and read the chapter about Accessors/Mutators and Casts today.

I understand what they do and how they do it. My question is when to use one over the other as both get and set.

I used casts a lot, in my current project it is accessors and mutators.

What are your best practices and use cases, or are you not using them at all, due to too much magic.

Thank you for any insights and tips & tricks! 👍🏼

@mikewink for me I use accessor/mutator for simple conversion and for complex I reach for cast, specifically when the value is a value object or something similar