F
Filamentβ€’11mo ago
lazydog

Heading Icon

How can I add an icon to getHeading method from ViewRecord? public function getHeading(): string { return "Viewing text <icon here>"; }
6 Replies
lazydog
lazydogOPβ€’11mo ago
I would like to add this one "heroicon-s-heart" but no icon has shown
Dennis Koch
Dennis Kochβ€’11mo ago
Use new HtmlString() combined with Blade::render("@svg('heroicon-s-heaert')")
lazydog
lazydogOPβ€’11mo ago
I've tried this one new HtmlString(Blade::render("@svg('heroicon-s-heart')")); but no luck. May I know what I've missed?
Dennis Koch
Dennis Kochβ€’11mo ago
Did you change the return type? Or is it still string?
lazydog
lazydogOPβ€’11mo ago
still string
Dennis Koch
Dennis Kochβ€’11mo ago
You should change the return type if you change the value you return πŸ˜‰ Maybe you need to override getHeader() because heading only allows string not sure.
Want results from more Discord servers?
Add your server