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

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

into something like this:
    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;
    }
}
Was this page helpful?