F
Filamentβ€’8mo ago
zakrom

title page

I tried to adjust the title of my page from the default that would be the name of the model
No description
25 Replies
Dan Harrin
Dan Harrinβ€’8mo ago
each page has a $title your IDE will tell you if a property exists or not if its not there, its wrong. please dont try guessing APIs
PabloZagni
PabloZagniβ€’6mo ago
I'm trying to change the title of the PanelProvider with protected static ?string $title = 'Finance dashboard'; and it doesn't work.
Matthew
Matthewβ€’6mo ago
Yeah, this doesnt really help us What is your code?
PabloZagni
PabloZagniβ€’6mo ago
Sorry... give me five mins I cloned the demo project
PabloZagni
PabloZagniβ€’6mo ago
No description
PabloZagni
PabloZagniβ€’6mo ago
add the $title
PabloZagni
PabloZagniβ€’6mo ago
Title is still the same
No description
PabloZagni
PabloZagniβ€’6mo ago
what I'm doing wrong?
Matthew
Matthewβ€’6mo ago
Thats not how you change the title You use ->brandName() @PabloZagni Also, the panel provider isnt a page. Thats why you cant change it with $title
PabloZagni
PabloZagniβ€’6mo ago
Thanks for you time Matthew There are so many objects, I'm trying to understand the whole ecosystem... and how it works
PabloZagni
PabloZagniβ€’6mo ago
As I read this, I tryed to change the panel's title...
No description
Matthew
Matthewβ€’6mo ago
Noo haha, by Dashboard it means the title of the dashboard page
PabloZagni
PabloZagniβ€’6mo ago
Now I see it!!
No description
Matthew
Matthewβ€’6mo ago
The thing on the top left is the brand name. The way I showed you with ->brandName() is the way you change from filament BUT you can also change it from the .env file by editing the APP_NAME variable So 2 ways in general You're welcome πŸ™‚ Can you mark my answer as the solution so others can see it?
PabloZagni
PabloZagniβ€’6mo ago
As soon I make it work... I'm trying
PabloZagni
PabloZagniβ€’6mo ago
I need to change this ones
No description
Matthew
Matthewβ€’6mo ago
Ohhhh, well now you are giving me more context. So to do that you will need to create a new Dashboard page as described here:
PabloZagni
PabloZagniβ€’6mo ago
@zakrom should mark it as answered
Matthew
Matthewβ€’6mo ago
And then in that new file you would need to add the $title to change it
PabloZagni
PabloZagniβ€’6mo ago
, create a new file at app/Filament/Pages/Dashboard.php:
Matthew
Matthewβ€’6mo ago
to change 1) protected static ?string $navigationLabel = 'Custom Navigation Label'; to change 2) protected static ?string $title = 'Custom Page Title';
PabloZagni
PabloZagniβ€’6mo ago
Yes! this worked charm!!! You rock dude πŸ˜‰
Matthew
Matthewβ€’6mo ago
you're welcome πŸ™‚
PabloZagni
PabloZagniβ€’6mo ago
No description