FilamentF
Filament14mo ago
Ava

PHP inside of HtmlString?

I am trying to include the domain within the HtmlString but its a modal from a table. So each modal has its only domain.

->modalDescription(new HtmlString('Paste your Username from <a href="'. $record->url .'">'. $record->name .' </a>\'s user page' ) )


If Vanilla PHP this is easily doable but that doesnt seem to be the case.
Solution
->modalDescription(function($record) { return new HtmlString(…); })
Was this page helpful?