소스 검색

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

Loading…
취소
저장