|
@@ -53,7 +53,10 @@ class Generator
|
|
*/
|
|
*/
|
|
public function processRoute(Route $route, array $rulesToApply = [])
|
|
public function processRoute(Route $route, array $rulesToApply = [])
|
|
{
|
|
{
|
|
- $action = $route->getAction()['uses'];
|
|
|
|
|
|
+ $action = $route->getAction();
|
|
|
|
+ if (is_array($action) && array_key_exists('uses', $action)) {
|
|
|
|
+ $action = $action['uses'];
|
|
|
|
+ }
|
|
list($class, $method) = is_array($action) ? $action : explode('@', $action);
|
|
list($class, $method) = is_array($action) ? $action : explode('@', $action);
|
|
$controller = new ReflectionClass($class);
|
|
$controller = new ReflectionClass($class);
|
|
$method = $controller->getMethod($method);
|
|
$method = $controller->getMethod($method);
|