I am loging out user through following code. This is my view code behind logout button:
\"&g
You must only replace 'logout' => ['post'], with 'logout' => ['get']. In this way your error will be solved.
This way works only with Yii Framework version 2.