Hi guys,
for logging out, I try to set linkOptions like this, but I will get 405 error(method not allowed). Any ideas, how to set this parameter correctly?
echo SideNav::widget([
'encodeLabels' => false,
'items' => [
['label' => 'Home', 'icon' => 'home', 'url' => Url::to(['/site/index'])],
['label' => 'Admin', 'icon' => 'book', 'items' => [
['label' => 'Logout', 'url' => Url::to(['/site/logout']), 'linkOptions' => ['data' => ['method' => 'post']]],
.
Using yii\bootstrap\NavBar, this code will do its job. Using kartik widget SideNav, it won’t ! .