Closed pabloelcolombiano closed 3 years ago
We might need for RC to simply create an additional setField(string $key, mixed $value)
method.
How to use it: ArticleFactory::make()->setField('name', 'Mexico');
It is more convenient than the patchData, which requires typing arrays.
You mean it is more convenient than patchdData when setting one single field? Or do you see other use cases when this is also more convenient?
Yes, more convenient when setting one single field. It is simply easier to type, and occurs often.
Then fine with me for adding it
The first argument should be the key, the second the value.
This should be RC with the actual implementation