浏览代码

controller call

tags/0.1.0
Robin Thoni 8 年前
父节点
当前提交
ff0d4f87dd
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5
    3
      src/Utils/LuRoute.php

+ 5
- 3
src/Utils/LuRoute.php 查看文件

@@ -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
     /**

正在加载...
取消
保存