@@ 31-42 (lines=12) @@ | ||
28 | ->map([Str::class, 'camel']); |
|
29 | } |
|
30 | ||
31 | public function appends(): Collection |
|
32 | { |
|
33 | $appendParameterName = config('query-builder.parameters.append'); |
|
34 | ||
35 | $appendParts = $this->query($appendParameterName); |
|
36 | ||
37 | if (! is_array($appendParts)) { |
|
38 | $appendParts = explode(',', strtolower($appendParts)); |
|
39 | } |
|
40 | ||
41 | return collect($appendParts)->filter(); |
|
42 | } |
|
43 | ||
44 | public function filters(): Collection |
|
45 | { |
|
@@ 76-87 (lines=12) @@ | ||
73 | }); |
|
74 | } |
|
75 | ||
76 | public function sorts(): Collection |
|
77 | { |
|
78 | $sortParameterName = config('query-builder.parameters.sort'); |
|
79 | ||
80 | $sortParts = $this->query($sortParameterName); |
|
81 | ||
82 | if (is_string($sortParts)) { |
|
83 | $sortParts = explode(',', $sortParts); |
|
84 | } |
|
85 | ||
86 | return collect($sortParts)->filter(); |
|
87 | } |
|
88 | ||
89 | /** |
|
90 | * @param $value |