From 025d8f691d883d11511c45da4738d2c5af6b2afe Mon Sep 17 00:00:00 2001 From: Toby Zerner Date: Sun, 2 Aug 2015 17:26:30 +0930 Subject: [PATCH] Add API methods to add POST/DELETE routes to the API --- src/Events/RegisterApiRoutes.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Events/RegisterApiRoutes.php b/src/Events/RegisterApiRoutes.php index 943a9437a..206ce43c4 100644 --- a/src/Events/RegisterApiRoutes.php +++ b/src/Events/RegisterApiRoutes.php @@ -24,11 +24,21 @@ class RegisterApiRoutes $this->route('get', $url, $name, $action); } + public function post($url, $name, $action) + { + $this->route('post', $url, $name, $action); + } + public function patch($url, $name, $action) { $this->route('patch', $url, $name, $action); } + public function delete($url, $name, $action) + { + $this->route('delete', $url, $name, $action); + } + protected function route($method, $url, $name, $action) { $this->routes->$method($url, $name, $this->action($action));