Logout error.
The GET method is not supported for route admin/logout. Supported methods: POST.
Laravel: 11
Breeze + Livewire
Filament 3.2
Does any one experience this issue. Do I have to create my own logout class?
#logout #laravel11

Solution:Jump to solution
got solution how, form calling to http: while the host is https: I have to put URL::forceScheme('https'); to make it works
4 Replies

form has method=post correctly, but why does not work. very strange.

Solution
got solution how, form calling to http: while the host is https: I have to put URL::forceScheme('https'); to make it works
Sorry, this is not seems to be a good answer. I found that after forcing https the spa mode no longer works.
I had to use my custom UserMenuItem for logout like this. I don't quite like it. ->userMenuItems([
'logout' => MenuItem::make()->label('Logout')->url(fn (): string =>
Route::post('admin/logout', Logout::class, ['_token' => csrf_token()])->uri()),
])
got if fixed now with this
$this->app['request']->server->set('HTTPS','on'); // Pagination Links support HTTPS
URL::forceScheme('https');