App\Filament\Pages\Tenancy\EditTeamProfile does not implement methods 'getAction', 'getAct

I have this page to edit tenants (copied from the docs):
<?php

namespace App\Filament\Pages\Tenancy;

use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Pages\Tenancy\EditTenantProfile;

class EditTeamProfile extends EditTenantProfile
{
public static function getLabel(): string
{
return 'Team profile';
}

public function form(Form $form): Form
{
return $form
->schema([
TextInput::make('name'),
TextInput::make('avatar_url'),
]);
}
}
<?php

namespace App\Filament\Pages\Tenancy;

use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Pages\Tenancy\EditTenantProfile;

class EditTeamProfile extends EditTenantProfile
{
public static function getLabel(): string
{
return 'Team profile';
}

public function form(Form $form): Form
{
return $form
->schema([
TextInput::make('name'),
TextInput::make('avatar_url'),
]);
}
}
The error says I haven't implemented required classes. To “fix” this error, I've created the following:
<?php

namespace App\Filament\Pages\Tenancy;

use Filament\Actions\Action;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Pages\Tenancy\EditTenantProfile;

class EditTeamProfile extends EditTenantProfile
{

public function getAction(string|array $name): ?Action
{
return Action::make('placeholder');
}

public function getActiveActionsLocale(): ?string
{
return 'nl_NL';
}

public static function getLabel(): string
{
return __('Team profile');
}

public function form(Form $form): Form
{
return $form
->schema([
TextInput::make('name'),
TextInput::make('avatar_url'),
]);
}
}
<?php

namespace App\Filament\Pages\Tenancy;

use Filament\Actions\Action;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Form;
use Filament\Pages\Tenancy\EditTenantProfile;

class EditTeamProfile extends EditTenantProfile
{

public function getAction(string|array $name): ?Action
{
return Action::make('placeholder');
}

public function getActiveActionsLocale(): ?string
{
return 'nl_NL';
}

public static function getLabel(): string
{
return __('Team profile');
}

public function form(Form $form): Form
{
return $form
->schema([
TextInput::make('name'),
TextInput::make('avatar_url'),
]);
}
}
Solution:
Oh my bad, my IDE might have indexed the files wrong. After removing the methods and reloading a couple times everything still worked.
Jump to solution
3 Replies
Proculair B.V.
Proculair B.V.OP17mo ago
These methods are required by the HasActions trait. In the class Filament\Pages\BasePage which is extended by Filament\Pages\Tenancy\EditTenantProfile
Solution
Proculair B.V.
Proculair B.V.17mo ago
Oh my bad, my IDE might have indexed the files wrong. After removing the methods and reloading a couple times everything still worked.
Proculair B.V.
Proculair B.V.OP17mo ago
My bad
Want results from more Discord servers?
Add your server