Closed fireboy1919 closed 8 years ago
Yes, it's still supported. All you need to do is pass the customized store instance to factory muffin when you construct it:
use League\FactoryMuffin\FactoryMuffin;
use League\FactoryMuffin\Stores\ModelStore;
new FactoryMuffin(new ModelStore(null, 'myCustomSoftDeleteMethod'));
Infact, we already have an example on our readme: https://github.com/thephpleague/factory-muffin/blob/master/README.md#real-examples.
Is this gone forever?
Calling "setDeleteMethod" results in an undefined method in FactoryMuffin 3.0.
If we're using soft deletes in our codebase, then this is a problem. We need to be able to delete using something other than "delete" in tests.