yii2 back to previous page after update
<p>How can i redirect user to previous page after updating a record? this is the typical scenario:</p>

<ul>
<li>Users is in index page and filters results or paginates over the records, then they find the one that they want to edit and click the edit button. They update that record's data and once they click on "update" button they whould be redirected to index view but with the filters/page previously selected.</li>
</ul>

<p>Ive tried using below in my controller after updating</p>

<pre><code>return $this-&gt;redirect('index',302); (this is not what I need)

return $this-&gt;redirect(Yii::$app-&gt;request-&gt;referrer); (this gets user back to update view and not to index view with filters)

return $this-&gt;goBack(); (this gets user to homepage)
</code></pre>

<p>Thanks!</p>