I have a situation where I have set some custom attributes on a model. These attributes don't exist in the database. When using ->isDirty() on the model I get the custom attributes that don't belong in the database.
Is there some clean way to remove these attrbiutes before saving the model?
$model = SomeModel::find(1);
$model->database_attribute = 'I exists in the database';
$model->custom_not_in_database_attribute = 'I don\'t exists in the database';
$model->save(); // remove dirty on save?!
I can of course just unset them unset($model->custom_not_in_database_attribute), but I like to know if there is a cleaner way to do this?
Something like (not existing) $model->saveOriginalOnly()