Skip to content

Inconsistent method names for setting relation inverse type #35

@lindyhopchris

Description

@lindyhopchris

At the moment, you call $relation->inverseType('type') to set the inverse type for a non-polymorph relation. But for a polymorph, you call $relation->types('type1', 'type2') to set the inverse type. This doesn't feel intuitive or consistent.

The types method should just be the plural of the method that's used to set a single type. Or if it's possible just use a single method for both, e.g. inverse. (But need to check what method names are being used by the implementation to get the inverse type.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions