You use Eloquent Mutators to transform the value before saving it into the database. Example: re-formatting the date to the correct format, hashing the password.
All you need to do is define the method in your Model: function setFieldAttribute($value) and do the transformations inside.
Read more in the official Laravel docs.
All you need to do is define the method in your Model: function setFieldAttribute($value) and do the transformations inside.
Read more in the official Laravel docs.