Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

warpig's avatar
Level 12

change label/title/header on a filament table (relation manager)

ok, i tried to be as explicit as i could in the title because it seems simple but i dont know how to access that part of the table.

ive tried several names to get to the part that i want to edit with either the method instead or the protected string

    public function getTableHeading(): string
    {
        return 'Variaciones de atributos'; // Título personalizado
    }
    protected static ?string $getTableHeader = 'Variaciones de atributos';

nothing so far changes it. the table im looking to update comes from a relationship manager class (not sure if that makes any difference at all)

here's a picture :-) -> https://imgur.com/a/b39HPHf

0 likes
2 replies
LaryAI's avatar
LaryAI
AI
Best Answer
Level 58

To change the label/title/header on a Filament table within a relation manager, you need to override the getTableHeading() method in your relation manager class. However, it's important to ensure that you're doing this in the correct context and that your method is properly defined.

Here's a step-by-step guide to help you achieve this:

  1. Ensure You're in the Correct Class: Make sure that you're overriding the method in the correct relation manager class. This class should extend RelationManager.

  2. Override the getTableHeading() Method: You should define the getTableHeading() method in your relation manager class. This method should return the string you want to use as the table heading.

Here's an example of how you can implement this:

use Filament\Resources\RelationManagers\RelationManager;

class YourRelationManager extends RelationManager
{
    // Other methods and properties...

    public function getTableHeading(): string
    {
        return 'Variaciones de atributos'; // Custom heading
    }
}
  1. Clear Cache: If changes are not reflecting, try clearing the cache. Sometimes, cached views or configurations can prevent changes from appearing immediately.

  2. Check Filament Version: Ensure that you are using a version of Filament that supports this method. If you're using an older version, consider updating to the latest version.

  3. Debugging: If it still doesn't work, add a dd() or dump() inside the getTableHeading() method to ensure that the method is being called.

By following these steps, you should be able to customize the table heading in your Filament relation manager. If you continue to experience issues, double-check that there are no typos and that the class is correctly set up in your Filament resource.

gludovatza's avatar

Try the getTitle method:

public static function getTitle(Model $ownerRecord, string $pageClass): string { return 'Variaciones de atributos'; }

Please or to participate in this conversation.