File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ $router = new Router;
6363// For basic GET URI
6464$router->get('/', function(Request $request, Response $response) {
6565 $response->setContent('Hello World');
66- return $response->send() ;
66+ return $response;
6767
6868 # OR
6969 # return 'Hello World!';
Original file line number Diff line number Diff line change @@ -536,17 +536,7 @@ public function getMiddlewares(): array
536536 */
537537 protected function runRouteMiddleware (array $ middleware , string $ type ): void
538538 {
539- if ($ type === 'before ' ) {
540- if (!is_null ($ middleware ['group ' ])) {
541- $ this ->routerCommand ()->beforeAfter ($ middleware ['group ' ][$ type ]);
542- }
543- $ this ->routerCommand ()->beforeAfter ($ middleware [$ type ]);
544- } else {
545- $ this ->routerCommand ()->beforeAfter ($ middleware [$ type ]);
546- if (!is_null ($ middleware ['group ' ])) {
547- $ this ->routerCommand ()->beforeAfter ($ middleware ['group ' ][$ type ]);
548- }
549- }
539+ $ this ->routerCommand ()->beforeAfter ($ middleware [$ type ]);
550540 }
551541
552542 /**
You can’t perform that action at this time.
0 commit comments