philipbrown/magniloquent — pull request #10 by searsaw (2013-11-15 00:06:33+00:00)
Title: Added touch parameter to save to avoid error when changing touch option on save.

When a model is saved, Magniloquent takes in an `$options` array. This allows people to set the attributes on the model when calling `save()`. However, Eloquent allows you to not update the timestamps of the relationships of the model if you don't want to by passing a `touch` key with a value of `false` in the array. If a user were to submit that to the `save()` method, it would be passed to `hydrate()`. This would put a `touch` attribute on the model. When saving, this would throw an error because there wouldn't be a `touch` field in the database. Since this is probably a little used feature, it probably hasn't come up yet.

This addition will not break the code since the `$touch` parameter is optional and only affects the `performSave()` method. I also renamed the `$options` parameter to `$new_attributes` to reflect its new usage.