|
@@ -6,13 +6,11 @@ use Laravel\Lumen\Routing\Controller as BaseController;
|
6
|
6
|
|
7
|
7
|
class LuController extends BaseController
|
8
|
8
|
{
|
9
|
|
- public static $parameters = null;
|
|
9
|
+ public static $parameters = array();
|
10
|
10
|
|
11
|
11
|
function execute($businessClass, $businessMethod)
|
12
|
12
|
{
|
13
|
|
- $params = app('request')->route()[2];
|
14
|
|
- self::$parameters = array_merge($_GET, $_POST, $params);
|
15
|
|
- $business = new $businessClass();
|
|
13
|
+ self::$parameters = array_merge($_GET, $_POST, app('request')->route()[2], self::$parameters);
|
16
|
14
|
|
17
|
15
|
$reflect = new \ReflectionMethod($businessClass, $businessMethod);
|
18
|
16
|
$params = $reflect->getParameters();
|
|
@@ -27,6 +25,6 @@ class LuController extends BaseController
|
27
|
25
|
}
|
28
|
26
|
}
|
29
|
27
|
|
30
|
|
- return LuOutputFormatter::formatSuccess(call_user_func_array(array($business, $businessMethod), $args));
|
|
28
|
+ return LuOutputFormatter::formatSuccess(forward_static_call_array(array($businessClass, $businessMethod), $args));
|
31
|
29
|
}
|
32
|
30
|
}
|