我创建没有扩展控制器的助手,比如这个
class SomeClass{
public function static SomeMethod(){
//this function for send email
$controller = new \yii\web\Controller();
$controller->renderAjax("template", "array");
}
}
以上代码如何生成Missing argument 1 for yii\base\Controller::__construct(), called in common\component\BeoHelper.php on line 1715 and defined
我该如何解决?
答案 0 :(得分:0)
试试这个:
\Yii::$app->controller->renderAjax(...);