F
Filamentβ€’13mo 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β€’13mo 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β€’11mo 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β€’11mo ago
Yeah, this doesnt really help us What is your code?
PabloZagni
PabloZagniβ€’11mo ago
Sorry... give me five mins I cloned the demo project
PabloZagni
PabloZagniβ€’11mo ago
No description
PabloZagni
PabloZagniβ€’11mo ago
add the $title
PabloZagni
PabloZagniβ€’11mo ago
Title is still the same
No description
PabloZagni
PabloZagniβ€’11mo ago
what I'm doing wrong?
Matthew
Matthewβ€’11mo 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β€’11mo 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β€’11mo ago
As I read this, I tryed to change the panel's title...
No description
Matthew
Matthewβ€’11mo ago
Noo haha, by Dashboard it means the title of the dashboard page
PabloZagni
PabloZagniβ€’11mo ago
Now I see it!!
No description
Matthew
Matthewβ€’11mo 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β€’11mo ago
As soon I make it work... I'm trying
PabloZagni
PabloZagniβ€’11mo ago
I need to change this ones
No description
Matthew
Matthewβ€’11mo 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β€’11mo ago
@zakrom should mark it as answered
Matthew
Matthewβ€’11mo ago
And then in that new file you would need to add the $title to change it
PabloZagni
PabloZagniβ€’11mo ago
, create a new file at app/Filament/Pages/Dashboard.php:
Matthew
Matthewβ€’11mo ago
to change 1) protected static ?string $navigationLabel = 'Custom Navigation Label'; to change 2) protected static ?string $title = 'Custom Page Title';
PabloZagni
PabloZagniβ€’11mo ago
Yes! this worked charm!!! You rock dude πŸ˜‰
Matthew
Matthewβ€’11mo ago
you're welcome πŸ™‚
PabloZagni
PabloZagniβ€’11mo ago
No description
Want results from more Discord servers?
Add your server