title: Why does yii2 wants to logout through post method
body: <p>I am new to yii and I was trying to create a simple authentication with the default behavior function in the site controller.</p>
  
  <p>when done, I could login but could not logout and the error was shown:</p>
  
  <pre><code>Method Not Allowed. This url can only handle the following request methods: POST. 
  </code></pre>
  
  <p>Then I checked the controller and noticed:</p>
  
  <pre><code>public function behaviors()
  {
      return [
          'access' =&gt; [
              'class' =&gt; AccessControl::className(),
              'rules' =&gt; [
                  [
                      'actions' =&gt; ['login', 'error'],
                      'allow' =&gt; true,
                  ],
                  [
                      'actions' =&gt; ['logout', 'index'],
                      'allow' =&gt; true,
                      'roles' =&gt; ['@'],
                  ],
              ],
          ],
          'verbs' =&gt; [
              'class' =&gt; VerbFilter::className(),
              'actions' =&gt; [
                  'logout' =&gt; ['post'],
              ],
          ],
      ];
  }
  </code></pre>
  
  <p>I changed the </p>
  
  <pre><code>'actions' =&gt; [
       'logout' =&gt; ['post'],
  ],
  </code></pre>
  
  <p>to</p>
  
  <pre><code>'actions' =&gt; [
       'logout' =&gt; ['get'],
  ],
  </code></pre>
  
  <p>and it worked fine.</p>
  
  <p>I wonder what the concept behind this is and why would yii want to use post method for logout.</p>