Browse Source

controller call

tags/0.1.0
Robin Thoni 8 years ago
parent
commit
ff0d4f87dd
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      src/Utils/LuRoute.php

+ 5
- 3
src/Utils/LuRoute.php View File

@@ -92,9 +92,11 @@ class LuRoute {
92 92
                 }
93 93
             }
94 94
 
95
-            return LuOutputFormatter::formatSuccess(forward_static_call_array(array($controller, $method), $args));
96
-        },
97
-            'middleware' => $middleware_string];
95
+            $controllerInstance = new $controller();
96
+            $result = call_user_func_array(array($controllerInstance, $method), $args);
97
+
98
+            return LuOutputFormatter::formatSuccess($result);
99
+        }, 'middleware' => $middleware_string];
98 100
     }
99 101
 
100 102
     /**

Loading…
Cancel
Save