F
Filamentβ€’16mo ago
kennyhorna

Change relantion manager tab title

Hello, I wan to change (translate) the tab title of relationships. I have tried setting all possible labels that I coud find
class DishesRelationManager extends RelationManager
{
protected static string $relationship = 'dishes';

protected static ?string $label = 'plato';
protected static ?string $pluralLabel = 'platos';
protected static ?string $pluralModelLabel = 'platos';

// ...
class DishesRelationManager extends RelationManager
{
protected static string $relationship = 'dishes';

protected static ?string $label = 'plato';
protected static ?string $pluralLabel = 'platos';
protected static ?string $pluralModelLabel = 'platos';

// ...
and also the heading() method of the table object
public function table(Table $table): Table
{
return $table
->recordTitleAttribute('name')
->heading('Platos')
// ...
public function table(Table $table): Table
{
return $table
->recordTitleAttribute('name')
->heading('Platos')
// ...
but no luck so far. Where can I adjust it? Thanks in advance.
5 Replies
Dennis Koch
Dennis Kochβ€’16mo ago
I think it's $title and getTitle()
toeknee
toekneeβ€’16mo ago
protected static ?string $title = 'test';
kennyhorna
kennyhornaOPβ€’16mo ago
omg, I didn't think about that word. Indeed, $title was the one. Thank you both!
Dennis Koch
Dennis Kochβ€’16mo ago
You even put it in your question πŸ˜…
kennyhorna
kennyhornaOPβ€’16mo ago
Well, it happens sometimes
Want results from more Discord servers?
Add your server