File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,20 @@ public function defaultInclude(array $include): static
17
17
return $ this ;
18
18
}
19
19
20
+ public function addDefaultInclude (array $ include ): static
21
+ {
22
+ $ this ->defaultInclude = array_merge ($ this ->defaultInclude ?? [], $ include );
23
+
24
+ return $ this ;
25
+ }
26
+
27
+ public function removeDefaultInclude (array $ include ): static
28
+ {
29
+ $ this ->defaultInclude = array_diff ($ this ->defaultInclude ?? [], $ include );
30
+
31
+ return $ this ;
32
+ }
33
+
20
34
private function getInclude (Context $ context ): array
21
35
{
22
36
if (
Original file line number Diff line number Diff line change @@ -37,9 +37,9 @@ public function type(string|array $type): static
37
37
/**
38
38
* Allow this relationship to be included.
39
39
*/
40
- public function includable (): static
40
+ public function includable (bool $ includable = true ): static
41
41
{
42
- $ this ->includable = true ;
42
+ $ this ->includable = $ includable ;
43
43
44
44
return $ this ;
45
45
}
You can’t perform that action at this time.
0 commit comments