@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * |
| 32 | 32 | * @var array |
| 33 | 33 | */ |
| 34 | - private $componentMethods = ['GET','POST', 'PUT']; |
|
| 34 | + private $componentMethods = ['GET', 'POST', 'PUT']; |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * Construct routing builder. |
@@ -70,10 +70,10 @@ discard block |
||
| 70 | 70 | { |
| 71 | 71 | // $this->componentMethods = Router::$verbs; |
| 72 | 72 | |
| 73 | - $this->componentCollection->each(function ($component, $controller) use ($router) { |
|
| 74 | - collect($component)->each(function ($attributes, $function) use ($controller, $router) { |
|
| 75 | - $router->group(['prefix' => $controller], function (Router $router) use ($controller, $function, $attributes) { |
|
| 76 | - collect($this->componentMethods)->each(function ($type) use ($router, $controller, $function, $attributes) { |
|
| 73 | + $this->componentCollection->each(function($component, $controller) use ($router) { |
|
| 74 | + collect($component)->each(function($attributes, $function) use ($controller, $router) { |
|
| 75 | + $router->group(['prefix' => $controller], function(Router $router) use ($controller, $function, $attributes) { |
|
| 76 | + collect($this->componentMethods)->each(function($type) use ($router, $controller, $function, $attributes) { |
|
| 77 | 77 | $router->addRoute( |
| 78 | 78 | Str::upper($type), |
| 79 | 79 | $this->pathConvention($type, $function, $attributes), |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | */ |
| 97 | 97 | private function apiRouting(Router $router) |
| 98 | 98 | { |
| 99 | - $this->apiCollection->each(function ($routes, $method) use ($router) { |
|
| 99 | + $this->apiCollection->each(function($routes, $method) use ($router) { |
|
| 100 | 100 | if (!empty($routes)) { |
| 101 | 101 | list($path, $controller, $named) = Arr::first($routes); |
| 102 | 102 | $router->addRoute( |