Skip to content

Commit d000feb

Browse files
Deprecate request_data_source
Query string and body are now always checked for QB filter parameters
1 parent 2a10928 commit d000feb

File tree

3 files changed

+1
-23
lines changed

3 files changed

+1
-23
lines changed

config/query-builder.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,4 @@
3737
* URL is not allowed in the `allowedSorts()` method.
3838
*/
3939
'disable_invalid_sort_query_exception' => false,
40-
41-
/*
42-
* By default the package inspects query string of request using $request->query().
43-
* You can change this behavior to inspect the request body using $request->input()
44-
* by setting this value to `body`.
45-
*
46-
* Possible values: `query_string`, `body`
47-
*/
48-
'request_data_source' => 'query_string',
4940
];

docs/installation-setup.md

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,5 @@ return [
5050
* URL is not allowed in the `allowedFilters()` method.
5151
*/
5252
'disable_invalid_filter_query_exception' => false,
53-
54-
/*
55-
* By default the package inspects query string of request using $request->query().
56-
* You can change this behavior to inspect the request body using $request->input()
57-
* by setting this value to `body`.
58-
*
59-
* Possible values: `query_string`, `body`
60-
*/
61-
'request_data_source' => 'query_string',
6253
];
6354
```

src/QueryBuilderRequest.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,7 @@ protected function getFilterValue($value)
157157

158158
protected function getRequestData(?string $key = null, $default = null)
159159
{
160-
if (config('query-builder.request_data_source') === 'body') {
161-
return $this->input($key, $default);
162-
}
163-
164-
return $this->get($key, $default);
160+
return $this->input($key, $default);
165161
}
166162

167163
public static function setIncludesArrayValueDelimiter(string $includesArrayValueDelimiter): void

0 commit comments

Comments
 (0)