File tree 2 files changed +2
-12
lines changed
2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ $router = new Router;
63
63
// For basic GET URI
64
64
$router->get('/', function(Request $request, Response $response) {
65
65
$response->setContent('Hello World');
66
- return $response->send() ;
66
+ return $response;
67
67
68
68
# OR
69
69
# return 'Hello World!';
Original file line number Diff line number Diff line change @@ -536,17 +536,7 @@ public function getMiddlewares(): array
536
536
*/
537
537
protected function runRouteMiddleware (array $ middleware , string $ type ): void
538
538
{
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 ]);
550
540
}
551
541
552
542
/**
You can’t perform that action at this time.
0 commit comments