Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Ginioo authored Oct 7, 2017
1 parent 60064c2 commit e2ae21d
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
```
Expand Down

0 comments on commit e2ae21d

Please sign in to comment.