profile custom

Hi, everyone! How are you? I'm having trouble customizing the profile tab. I want to change the label to something like "Change password." I tried creating a new class and calling it in the panel, but it's been quite difficult. Could you help me with this?
7 Replies
Dennis Koch
Dennis Koch5mo ago
I guess it's the getHeading() or getTitle() method on the page. Extend the profile page, implement that method and overwrite it. Or: Adjust your language file.
I tried creating a new class and calling it in the panel, but it's been quite difficult.
What were you having issues with?
João Vitor Espindola
im put the methods and call on panel, like this ->

<?php

namespace App\Filament\Pages;

use Filament\Pages\Page;
use Illuminate\Support\Facades\Hash;
use Filament\Pages\Auth\EditProfile as BaseProfile;
use Illuminate\Validation\ValidationException;

class EditProfile extends BaseProfile
{
protected static ?string $navigationIcon = 'heroicon-o-key';
protected static string $view = 'filament.pages.edit-profile';

public $current_password;
public $new_password;
public $new_password_confirmation;

public static function getNavigationLabel(): string
{
return 'Troca de Senha';
}

public function getTitle(): string
{
return 'Troca de Senha';
}

public function getHeading(): string
{
return 'Troca de Senha';
}

public static function isSimple(): bool
{
return true;
}
}

<?php

namespace App\Filament\Pages;

use Filament\Pages\Page;
use Illuminate\Support\Facades\Hash;
use Filament\Pages\Auth\EditProfile as BaseProfile;
use Illuminate\Validation\ValidationException;

class EditProfile extends BaseProfile
{
protected static ?string $navigationIcon = 'heroicon-o-key';
protected static string $view = 'filament.pages.edit-profile';

public $current_password;
public $new_password;
public $new_password_confirmation;

public static function getNavigationLabel(): string
{
return 'Troca de Senha';
}

public function getTitle(): string
{
return 'Troca de Senha';
}

public function getHeading(): string
{
return 'Troca de Senha';
}

public static function isSimple(): bool
{
return true;
}
}
and i called here in the panel
->profile(EditProfile::class)
->profile(EditProfile::class)
Dennis Koch
Dennis Koch5mo ago
Did you provide the correct EditProfile class in your panel provider?
João Vitor Espindola
yes, I change the name but now I need to put simple component
Dennis Koch
Dennis Koch5mo ago
but now I need to put simple component
I don't understand? 🤔
João Vitor Espindola
before the class I used

->profile(isSimple: true)

->profile(isSimple: true)
but now I can't pass this variable i do tkss
Dennis Koch
Dennis Koch5mo ago
You can still add isSimple: true ->profile(EditProfile::class, isSimple: true)

Did you find this page helpful?