We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 01aa174 commit b4e911bCopy full SHA for b4e911b
src/Router/Router.php
@@ -4,6 +4,15 @@
4
5
namespace MicroPHP\Framework\Router;
6
7
+use League\Route\RouteGroup;
8
+
9
class Router extends \League\Route\Router
10
{
11
+ public function getOrPost(string $path, $handler): RouteGroup
12
+ {
13
+ return $this->group('', function(RouteGroup $group) use ($path, $handler) {
14
+ $group->get($path, $handler);
15
+ $group->post($path, $handler);
16
+ });
17
+ }
18
}
0 commit comments