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

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

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

  • \"&g
  • 7条回答
    •  独厮守ぢ
      2020-12-16 03:03

      u can change the view code and echo instead of

    • Log out
    • this one:

          ',
                 ['/site/logout'],
                 ['class'=>'btn btn-default btn-flat']), //optional* -if you need to add style
                 ['data' => ['method' => 'post',]])
              ?>
      

    提交回复
    热议问题