Skip to content

Commit 207cc0b

Browse files
(v2.5) Groupby fix
1 parent c156f9b commit 207cc0b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/LaravelRequestDocs.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,10 @@ public function groupDocs($docs, $group = 'default')
133133
$groupDocs = $this->groupDocsByFQController($docs);
134134
}
135135

136-
return collect($groupDocs)->sortBy(['group', 'group_index'])
136+
$groupBy = ['group', 'group_index'];
137+
return collect($groupDocs)->groupBy($groupBy)
137138
->values()
139+
->flatten(count($groupBy))
138140
->toArray();
139141
}
140142

0 commit comments

Comments
 (0)