The creator of Laravel, Taylor Otwell, recently introduced a new, improved way to declare accessors and mutators on your Eloquent models. While the traditional getNameAttribute and setNameAttribute syntax won't go away, I think you'll appreciate this new single-method approach for being a bit more in the Laravel spirit. Let's take a look.
Laravel 8.77 Mutator Changes
