© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•7mo ago•
7 replies
warNuttah

custom dashboard page header heading | add auth user name into the heading of a page

im looking to turn this:
    protected ?string $heading = 'Welcome';
    protected ?string $heading = 'Welcome';

into something like this:
    protected ?string $heading = 'Welcome ' . auth()->user();
    protected ?string $heading = 'Welcome ' . auth()->user();

but it doesn't work and haven't found a way to make it use the, currently authenticated user name. base class for Dashboard doesn't have a getHeading method. is it possible?
Solution
Hi, you have the getHeading() function on Dashboard too :
php 
class Dashboard extends \Filament\Pages\Dashboard
{
    public function getHeading(): string | Htmlable
    {
        return 'Dashboard of ' . filament()->auth()->user()->name;
    }
}
php 
class Dashboard extends \Filament\Pages\Dashboard
{
    public function getHeading(): string | Htmlable
    {
        return 'Dashboard of ' . filament()->auth()->user()->name;
    }
}
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

how can I create a custom page in filament, outside of the dashboard auth?
FilamentFFilament / ❓┊help
3y ago
Add Custom Header(topbar)
FilamentFFilament / ❓┊help
11mo ago
Add Custom Page and Widgets into Scheme
FilamentFFilament / ❓┊help
3y ago
Dashboard page - custom widget
FilamentFFilament / ❓┊help
3y ago