title: Yii2: How to redirect with POST method?
body: <p>I have the Yii2 <strong>delete action</strong> in a controller and I need to redirect to <code>index.php</code> with the <code>id</code> variable by POST method. This is how I do it with GET method:</p>
  
  <pre><code>public function actionDelete($id)
  {
      $this-&gt;findModel($id)-&gt;delete();
  
      return $this-&gt;redirect(['index?id=' . $id]);
  }
  </code></pre>
  
  <p>How can I redirect using the POST method?</p>