Skip to content

Generate factory for unconventional relationships #158

@jasonmccreary

Description

@jasonmccreary

With the merge of #154 there are many combinations of how a column may reference a model.

For example:

  • owner_id: foreign:user
  • foreign:countries.code

Currently there is a commented test which emphasizes the second example.

This issue to get this test to pass as well as add a test for first example which should generate a shorthand factory for the referenced model.

For example:

    // ...
    'owner_id` => factory(User::class),
    // ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestin progressThis issue is being worked on.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions