Skip to content

Conversation

@prashank25
Copy link

Hello,

this is the PR for issue #50, I got no response on the issue so I figured I might as well try a PR directly.

This PR adds support for using factories by Eloquent model morph name.

cy.create('App\\Models\\User', { email: 'test@example.com' });

can be a little more simplified and more straightforward to type

cy.create('user', { email: 'test@example.com' });

cy.create({
    model: 'user',
    attributes: { email: 'test@example.com' },
    count: 10
})

Feel free to close it if it's not something you want in the package.

Thank you!

Signed-off-by: Prashank Abhishek <prashank@codesm.com>
Signed-off-by: Prashank Abhishek <prashank@codesm.com>
Signed-off-by: Prashank Abhishek <prashank@codesm.com>
@grantholle
Copy link

I was going to contribute the same thing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants