Skip to content

Commit c4892fa

Browse files
committed
[Feature] Add default include paths method to resource query class
1 parent 4716b19 commit c4892fa

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

src/Http/Requests/ResourceQuery.php

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ class ResourceQuery extends FormRequest implements QueryParameters
5353
];
5454

5555
/**
56+
* The include paths to use if the client provides none.
57+
*
5658
* @var string[]|null
5759
*/
5860
protected ?array $defaultIncludePaths = null;
@@ -154,7 +156,7 @@ public function includePaths(): ?IncludePaths
154156
return IncludePaths::fromString($data['include'] ?: '');
155157
}
156158

157-
return IncludePaths::nullable($this->defaultIncludePaths);
159+
return IncludePaths::nullable($this->defaultIncludePaths());
158160
}
159161

160162
/**
@@ -227,6 +229,16 @@ public function unrecognisedParameters(): array
227229
])->all();
228230
}
229231

232+
/**
233+
* Get the default include paths to use if the client has provided none.
234+
*
235+
* @return string[]|null
236+
*/
237+
protected function defaultIncludePaths(): ?array
238+
{
239+
return $this->defaultIncludePaths;
240+
}
241+
230242
/**
231243
* @return void
232244
*/

0 commit comments

Comments
 (0)