dingo / dingo/api

Camel-Case relationship in include?

Open
#1,740 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
9.4k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

I have relationship like this in model:
`public function sampleItems(){
//code
}`

1:
`protected $availableIncludes = ['sampleItems'];`
when I use include for item it will return 'sampleItems'.
when I use include for collection or paginator it will return 'sample_items'.
why not the same return?
2:

when I use include for item ,I can use like this:
`protected $availableIncludes = ['sample_items'];`
And it will return 'sample_items'.

when I use include for collection or paginator,I can not use like this:
`protected $availableIncludes = ['sample_items'];`
And it will get an error.

So how can I use a relationship of Camel-Case in the right way when I use include?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.