B2
B2
FFilament
Created by B2 on 11/19/2024 in #❓┊help
The POST method is not supported for route admin/login for custom login page
Hello, I have an issue with a custom login page in Laravel 11 with Filament 3. When I submit the form, I get the error: "The POST method is not supported for route admin/login. Supported methods: GET, HEAD." Here’s my setup: Custom Login Class
class Login extends BaseAuth
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';
protected static string $view = 'filament.pages.auth.login';
protected static string $layout = 'filament.layouts.layout-login';

public function form(Form $form): Form
{
return $form
->schema([
$this->getEmailFormComponent(),
$this->getPasswordFormComponent(),
$this->getRememberFormComponent(),
])
->statePath('data');
}
}
class Login extends BaseAuth
{
protected static ?string $navigationIcon = 'heroicon-o-document-text';
protected static string $view = 'filament.pages.auth.login';
protected static string $layout = 'filament.layouts.layout-login';

public function form(Form $form): Form
{
return $form
->schema([
$this->getEmailFormComponent(),
$this->getPasswordFormComponent(),
$this->getRememberFormComponent(),
])
->statePath('data');
}
}
Added to AdminPanelProvider
public function panel(Panel $panel): Panel
{
return $panel
->login(Login::class);
}
public function panel(Panel $panel): Panel
{
return $panel
->login(Login::class);
}
Custom Template
<x-filament-panels::page.simple>
<x-filament-panels::form id="form" wire:submit="authenticate">
{{ $this->form }}
<x-filament-panels::form.actions :actions="$this->getCachedFormActions()" />
</x-filament-panels::form>
</x-filament-panels::page.simple>
<x-filament-panels::page.simple>
<x-filament-panels::form id="form" wire:submit="authenticate">
{{ $this->form }}
<x-filament-panels::form.actions :actions="$this->getCachedFormActions()" />
</x-filament-panels::form>
</x-filament-panels::page.simple>
Despite this, the error persists. Is there something I missed in the configuration? Thanks for your help!
5 replies
FFilament
Created by B2 on 9/6/2024 in #❓┊help
Export action doesn't work anymore
No description
4 replies
FFilament
Created by B2 on 2/16/2024 in #❓┊help
How to custom notifications content after export
No description
6 replies