Back

The GET method is not supported for route logout. Supported methods: POST.
When log out of your account, the above error will be reported. We still can’t find where the BUG is caused。
used Livewire 3 and mary-ui
image

2

341

In response to @yuan

The problem is when @click.prevent="$root.submit();" conflict with wire:navigate on the menu item component it's like in the background prevent twoo events the first one of form submissions and the second one with livewire wire:navigate you can delete wire navigate in the component or change the logout by a simple button instead of a link.

BTW it's normal to reload the page when u logout.

2

153

  • No matching results...
  • Searching...

/ 1000

Yeah this sounds about right - it is redirecting or trying to load in the browser before the POST is submitted.

1

116

Yeah, I think that wire:navigate works like a GET request, where it retrieves the route and compares it with the current content in the DOM. That’s why they are encountering this problem cause they try to GET route logout and that's not allowed .

check this part from the documentation:
livewire.laravel.com/docs/navigate


"By adding wire:navigate to each link in a navigation menu on each page, Livewire will prevent the standard handling of the link click and replace it with its own"

98

Thank you

112