Modify router to accept variables and do test
This commit is contained in:
@@ -65,7 +65,11 @@ class Router
|
||||
$action = $this->convertToCamelCaps($action);
|
||||
|
||||
if (is_callable([$object, $action])) {
|
||||
$object->$action();
|
||||
if (array_key_exists('id', $this->params)) {
|
||||
$var = $this->params['id'];
|
||||
return $object->$action($var);
|
||||
}
|
||||
return $object->$action();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user