Yii2, GridView, save filters value in session
问题 Is there any solution to save filters (in session) so user can see "last used filters" when he come back? Please link in manual or docs, or your code. I found nothing searching this question. 回答1: This is somewhat a hack, but this saves filter, page and sorting for me. Place this in your Controller, assuming your Model is called Customer : $searchModel = new CustomerSearch(); $params = Yii::$app->request->queryParams; if (count($params) <= 1) { $params = Yii::$app->session['customerparams'];