@@ 93-114 (lines=22) @@ | ||
90 | return collect($sortParts)->filter(); |
|
91 | } |
|
92 | ||
93 | protected function getFilterValue($value) |
|
94 | { |
|
95 | if (is_array($value)) { |
|
96 | return collect($value)->map(function ($valueValue) { |
|
97 | return $this->getFilterValue($valueValue); |
|
98 | })->all(); |
|
99 | } |
|
100 | ||
101 | if (Str::contains($value, ',')) { |
|
102 | return explode(',', $value); |
|
103 | } |
|
104 | ||
105 | if ($value === 'true') { |
|
106 | return true; |
|
107 | } |
|
108 | ||
109 | if ($value === 'false') { |
|
110 | return false; |
|
111 | } |
|
112 | ||
113 | return $value; |
|
114 | } |
|
115 | ||
116 | protected function getPartsOfRequest($parameter) |
|
117 | { |
@@ 68-86 (lines=19) @@ | ||
65 | ||
66 | $filters = collect($filterParts); |
|
67 | ||
68 | $filtersMapper = function ($value) { |
|
69 | if (is_array($value)) { |
|
70 | return collect($value)->map($this->bindTo($this))->all(); |
|
71 | } |
|
72 | ||
73 | if (Str::contains($value, ',')) { |
|
74 | return explode(',', $value); |
|
75 | } |
|
76 | ||
77 | if ($value === 'true') { |
|
78 | return true; |
|
79 | } |
|
80 | ||
81 | if ($value === 'false') { |
|
82 | return false; |
|
83 | } |
|
84 | ||
85 | return $value; |
|
86 | }; |
|
87 | ||
88 | $filters = $filters->map($filtersMapper->bindTo($filtersMapper)); |
|
89 |