From e0ef6c06c7eee26649e437216328f58cf27f1d1f Mon Sep 17 00:00:00 2001 From: Simon Dann Date: Thu, 5 Apr 2018 11:35:47 +0100 Subject: [PATCH] :bug: Route helper GET/POST/etc methods now return the Router --- src/App.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/App.php b/src/App.php index 5849ebb..93b9a93 100644 --- a/src/App.php +++ b/src/App.php @@ -107,10 +107,11 @@ public function register(AbstractServiceProvider $serviceProvider) * * @param $route * @param $action + * @return \League\Route\Route */ public function get($route, $action) { - $this->getRouter()->map('GET', $route, $action); + return $this->getRouter()->map('GET', $route, $action); } /** @@ -118,10 +119,11 @@ public function get($route, $action) * * @param $route * @param $action + * @return \League\Route\Route */ public function post($route, $action) { - $this->getRouter()->map('POST', $route, $action); + return $this->getRouter()->map('POST', $route, $action); } /** @@ -129,10 +131,11 @@ public function post($route, $action) * * @param $route * @param $action + * @return \League\Route\Route */ public function put($route, $action) { - $this->getRouter()->map('PUT', $route, $action); + return $this->getRouter()->map('PUT', $route, $action); } /** @@ -140,10 +143,11 @@ public function put($route, $action) * * @param $route * @param $action + * @return \League\Route\Route */ public function delete($route, $action) { - $this->getRouter()->map('DELETE', $route, $action); + return $this->getRouter()->map('DELETE', $route, $action); } /** @@ -151,10 +155,11 @@ public function delete($route, $action) * * @param $route * @param $action + * @return \League\Route\Route */ public function patch($route, $action) { - $this->getRouter()->map('PATCH', $route, $action); + return $this->getRouter()->map('PATCH', $route, $action); } /** @@ -162,10 +167,11 @@ public function patch($route, $action) * * @param $route * @param $action + * @return \League\Route\Route */ public function options($route, $action) { - $this->getRouter()->map('OPTIONS', $route, $action); + return $this->getRouter()->map('OPTIONS', $route, $action); } /**