© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•17mo ago•
1 reply
hrank8t

Refresh Heading and Subheading

 return new HtmlString(
            '<div><strong>Age:</strong> ' . $this->record->ageInYears .
                '<a href="tel:' . $this->record->mobile .
                '"> <strong>Mob:</strong> ' . $this->record->mobile . '</a>' .
            
                $mc
                . '</div><div>' .
                '<span title="Total Cost">' . '<strong> TC:</strong> ' . Number::currency($this->record->treatment->sum('cost'), 'INR') . '</span>' .
                '<span title="Total Paid">' . '<strong> TP:</strong> ' . Number::currency($this->record->payment->sum('amount'), 'INR') . '</span>' .
                '<span title="Balance" style="color:#ff6b6b">' . '<strong> B:</strong> ' . Number::currency(($this->record->treatment->sum('cost')
                    - $this->record->payment->sum('amount')), 'INR') . '</span></div>'

        );
 return new HtmlString(
            '<div><strong>Age:</strong> ' . $this->record->ageInYears .
                '<a href="tel:' . $this->record->mobile .
                '"> <strong>Mob:</strong> ' . $this->record->mobile . '</a>' .
            
                $mc
                . '</div><div>' .
                '<span title="Total Cost">' . '<strong> TC:</strong> ' . Number::currency($this->record->treatment->sum('cost'), 'INR') . '</span>' .
                '<span title="Total Paid">' . '<strong> TP:</strong> ' . Number::currency($this->record->payment->sum('amount'), 'INR') . '</span>' .
                '<span title="Balance" style="color:#ff6b6b">' . '<strong> B:</strong> ' . Number::currency(($this->record->treatment->sum('cost')
                    - $this->record->payment->sum('amount')), 'INR') . '</span></div>'

        );


This is the code in function getSubHeading() of the View page of a resource. This page also has Many Relation Managers. I want to refresh the Cost, Paid and Balance once the RM table is updated. Any way to do that?
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

Heading and Subheading not displayed
FilamentFFilament / ❓┊help
3y ago
Can I align header actions with the heading and not the entire heading + subheading?
FilamentFFilament / ❓┊help
2y ago
subheading at resource
FilamentFFilament / ❓┊help
3y ago
render blade in subheading?
FilamentFFilament / ❓┊help
2y ago