You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: