new MorphRelationship()
Properties:
Name | Type | Description |
---|---|---|
name |
string | The relationship name |
type |
string | The relationship type |
hasApi |
boolean | Determines if it has API endpoints |
idField |
Field | The id field of the relationship |
typeField |
Field | The type field of the relationship |
model |
Entity | Related model from this relationship |
pivot |
Entity | The pivot from this relationship |
localModel |
Entity | Local model from this relationship |
Methods
getCorrectAbleSuffix() → {string}
Returns its relationship suffix
Returns:
- Type
- string
getDefaultModelKeyName() → {string}
Returns the model default key name
Returns:
- Type
- string
getMorphableFields() → {Array.<Field>}
Returns its relationship fields
Returns:
- Type
- Array.<Field>
getType() → {string}
Returns its relationship type
Returns:
- Type
- string