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
1717 return $ this ;
1818 }
1919
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+
2034 private function getInclude (Context $ context ): array
2135 {
2236 if (
Original file line number Diff line number Diff line change @@ -37,9 +37,9 @@ public function type(string|array $type): static
3737 /**
3838 * Allow this relationship to be included.
3939 */
40- public function includable (): static
40+ public function includable (bool $ includable = true ): static
4141 {
42- $ this ->includable = true ;
42+ $ this ->includable = $ includable ;
4343
4444 return $ this ;
4545 }
You can’t perform that action at this time.
0 commit comments