Method Not Allowed (#405)

Hi , sorry for english , i installed the kartik sidenav , i want insert a logout but i have this problem :

Method Not Allowed (#405) Method Not Allowed. This url can only handle the following request methods: POST.

This is my menu in main :




 <?php

            if( $this->context->action->id != 'login'){


                echo SideNav::widget([

                'type' => SideNav::TYPE_DEFAULT,

                //'heading' => 'Options',

                'items' => [

                    [

                        

                        'label' => 'Gestione Utenti',

                         'items' => [

                            ['label' => 'Inserisci Utente', 'url' => ['/site/signup']],

                            ['label' => 'Lista Utenti','url'=>'#'],

                            ['label' => 'Ricerca Utenti',  'url'=>'#'],

                           

                         ],

                        

                    ],

                    [

                        'label' => 'Gestione prodotti',

                        //'icon' => 'question-sign',

                        'items' => [

                            ['label' => 'About', 'icon'=>'info-sign', 'url'=>'#'],

                            ['label' => 'Contact', 'icon'=>'phone', 'url'=>'#'],

                        ],

                    ],

                    [

                        'label' => 'Logout (' . Yii::$app->user->identity->username . ')',

                        'url'=>['/site/logout'], 

                        'linkOptions' => ['data-method' => 'post']

                       

                    ],

                ],

        ]);

    }

?>



this is the behaviors :




 public function behaviors()

    {

        return [

            'access' => [

                'class' => AccessControl::className(),

                'only' => ['logout', 'signup'],

                'rules' => [

                  

                    [

                        'actions' => ['logout'],

                        'allow' => true,

                        'roles' => ['@'],

                    ],

                ],

            ],

            'verbs' => [

                'class' => VerbFilter::className(),

                'actions' => [

                    'logout' => ['post'],

                ],

            ],

        ];

    }




What is wrong ?