Skip to content

Commit

Permalink
added json body support for post request as well
Browse files Browse the repository at this point in the history
  • Loading branch information
jturbide committed May 3, 2024
1 parent a829199 commit bd0b47a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Mvc/Controller/Traits/Params.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ public function getParams(array $filters = null): array
$params = $this->request->getFilteredQuery();
}
else if ($this->request->isPost()) {
$params = $this->request->getFilteredPost();
$params = array_merge_recursive(
$this->request->getFilteredPost(),
$this->request->getFilteredPatch()
);
}
else if ($this->request->isPatch()) {
$params = $this->request->getFilteredPatch();
Expand Down

0 comments on commit bd0b47a

Please sign in to comment.