Skip to content

Commit 5c4f676

Browse files
committed
fix route double listing, if route have 2 methods
1 parent 9c9987f commit 5c4f676

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
@@ -53,7 +53,9 @@ public function sortDocs(array $docs, $sortBy = 'default'): array
5353
foreach ($methods as $method) {
5454
foreach ($docs as $key => $doc) {
5555
if (in_array($method, $doc['methods'])) {
56-
$sorted[] = $doc;
56+
if (!in_array($doc, $sorted)){
57+
$sorted[] = $doc;
58+
}
5759
}
5860
}
5961
}

0 commit comments

Comments
 (0)