| @@ 29-40 (lines=12) @@ | ||
| 26 | return collect($includeParts)->filter(); |
|
| 27 | } |
|
| 28 | ||
| 29 | public function appends() |
|
| 30 | { |
|
| 31 | $appendParameter = config('query-builder.parameters.append'); |
|
| 32 | ||
| 33 | $appendParts = $this->query($appendParameter); |
|
| 34 | ||
| 35 | if (! is_array($appendParts)) { |
|
| 36 | $appendParts = explode(',', strtolower($appendParts)); |
|
| 37 | } |
|
| 38 | ||
| 39 | return collect($appendParts)->filter(); |
|
| 40 | } |
|
| 41 | ||
| 42 | public function filters() |
|
| 43 | { |
|
| @@ 94-105 (lines=12) @@ | ||
| 91 | }); |
|
| 92 | } |
|
| 93 | ||
| 94 | public function sorts(): Collection |
|
| 95 | { |
|
| 96 | $sortParameter = config('query-builder.parameters.sort'); |
|
| 97 | ||
| 98 | $sortParts = $this->query($sortParameter); |
|
| 99 | ||
| 100 | if (is_string($sortParts)) { |
|
| 101 | $sortParts = explode(',', $sortParts); |
|
| 102 | } |
|
| 103 | ||
| 104 | return collect($sortParts)->filter(); |
|
| 105 | } |
|
| 106 | ||
| 107 | protected function getFilterValue($value) |
|
| 108 | { |
|