Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using factories by morph name proposal #50

Open
Prashank25 opened this issue Apr 22, 2022 · 0 comments
Open

Using factories by morph name proposal #50

Prashank25 opened this issue Apr 22, 2022 · 0 comments

Comments

@Prashank25
Copy link

What are your thoughts on using the morph class name to fetch the model?

cy.create('App\\Models\\User', { email: '[email protected]' });

can be a little more simplified and easier to type

cy.create('user', { email: '[email protected]' });

cy.create({
    model: 'user',
    attributes: { email: '[email protected]' },
    count: 10
})

For those who use the morph map, it can be nice. Would you accept a PR for this?

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

No branches or pull requests

1 participant