Skip to content

Commit

Permalink
Fix multi methods in Controller shorthand
Browse files Browse the repository at this point in the history
  • Loading branch information
nezamy committed May 25, 2019
1 parent ba3c87e commit 8a5050b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions system/Route.php
Expand Up @@ -262,9 +262,8 @@ public function controller($uri, $controller, $options = [])
if (isset($split[0]) && $split[0] == 'Index') {
$fullUri = $uri;
}

if (in_array($request, ['POST', 'GET', 'PUT','PATCH','DELETE']))
$this->route([$request], $fullUri, $call, $options)->_as($as);
$methods = explode('_', $request);
$this->route($request, $fullUri, $call, $options)->_as($as);
}
} else {
throw new \Exception("Not found Controller {$controller} try with namespace");
Expand Down

0 comments on commit 8a5050b

Please sign in to comment.