In my controller's action of Yii2 application suppose the following:
public function actionView($i)
{
if ($i < 20)
{
//I want execute error 404
}
}
All what I can to do now is just setting a flash message and redirect to another action. However, I want to generate 404 Page not found response.