Completed
Push — master ( df8422...a2d6f0 )
by AHMED JOHARI
04:00
created
src/Routings/Builder.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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(
Please login to merge, or discard this patch.