Handsome.php (model)
public function validateHandsomeLvl()
{
if(1==1)
return \yii\web\Controller::redirect(['site/sorry']); <== Error Highlight
else
return array();
}
AbcController.php (controller)
use app\models\Handsome;
public function actionIndex()
{
$hs = new Handsome();
$hsLvl = $auth->validateHandsomeLvl();
if(is_array($hsLvl ))
return $this->render('index');
else
return $hsLvl;
}
May I know why when I access abc/index in localhost, it is working fine.
However when I access it in internet, I got error “Non-static method yii\web\Controller::redirect() should not be called statically”?