From e2ae21dc65ea394edc51ce1c23419dd5c3aca374 Mon Sep 17 00:00:00 2001 From: Gino Wu Date: Sat, 7 Oct 2017 13:35:49 +0800 Subject: [PATCH] Update README.md --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b7064a1..69b8320 100644 --- a/README.md +++ b/README.md @@ -53,15 +53,16 @@ $requestRoute = $route->getRequestRoute(); try { // use this only under develop environment - if (isset($inputData['debug']) && $app->hasRoute('debug')) { - $app->emit('debug', $inputData); + if (isset($inputData['debug']) && $route->hasRoute('debug')) { + $route->emit('debug', $inputData); } // 觸發事件 - if ($app->hasRoute($requestRoute)) { - $app->emit($requestRoute, $inputData); + if ($route->hasRoute($requestRoute)) { + $route->emit($requestRoute, $inputData); } } catch (Exception $e) { + // use this only under develop environment echo $e->getMessage(); } ```