Skip to content

Using factories by morph name proposal #50

@prashank25

Description

@prashank25

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

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

can be a little more simplified and easier to type

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

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions