Yii2: Method Not Allowed (#405) while logout user

前端 未结 7 1026
无人及你
无人及你 2020-12-16 03:02

I am loging out user through following code. This is my view code behind logout button:

  • \"&g
  • 7条回答
    •  萌比男神i
      2020-12-16 03:06

      Following works too assuming you might extra class and data-method attribute.

      user->identity->username . ')', 
              ['/site/logout'], 
              ['class' => 'ui inverted button', 'data-method' => 'post']                
          );
      ?>  
      

    提交回复
    热议问题