Yii2 redirect to previous page

后端 未结 3 1798
心在旅途
心在旅途 2021-01-31 02:26

Now My application is using gridview to list all information and it\'s also have pagination.when the user click on pagination number and then click on edit and then save. It red

3条回答
  •  醉梦人生
    2021-01-31 02:45

    It is true what @Kostas says, but I think it would be better if you simply code the following, because goBack take account of a null parameter already to goBack HOME.

    return $this->goBack(Yii::$app->request->referrer);
    

    I tested it and it works fine.

提交回复
热议问题