Replies: 1 comment
-
Hello @agri-pat, No, currently there is no way to customize the relation resource url. I will leave the issue open to see, if someone can pickup and make a PR for this. I may look into it once I have time for this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there any way to configure a relation that is the same model type to use a different resource url when using it as a relation. e.g. With the model below I want to the relationship url to be /api/paddocks/{paddock_id}/prior_paddocks/sync however the SDK attempting to use /api/paddocks/{paddock_id}/paddocks/sync
export default class Paddock extends Model<{
id: number
...
},
DefaultPersistedAttributes > {
public $resource (): string {
return 'paddocks'
}
...
public prior_paddocks (): BelongsToMany {
return new BelongsToMany(Paddock, this)
}
...}
Beta Was this translation helpful? Give feedback.
All reactions