Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[6.x] Add 'setRawAttribute' method #30853
// Set attribute to value. $model->setRawAttribute('key', $value); // Set attribute to value and also sync to original attribute. $model->setRawAttribute('key', $value, true);
Currently it's not possible to skip a mutator of one specific attribute.
I did not add any tests, because I could not find one for
@taylorotwell I believe this creates a clash: If there is an attribute named 'raw', and the developer wanted to set its value with a mutator using $model->raw = 'value', that mutator method would be named setRawAttribute(...), with a different signature to this new one.