F
Filament9mo ago
camya

Notification ->body('Some **bold** info') -- Markdown not parsed in V3

In V3, Markdown is not parsed when I do Notification::make()->body('Some **bold** text')->>send(); Is there a replacement method to parse the body? There is no mention of this change in the V3 documentation or in the "Upgrading from v2.x" guide. It would be great, if the documentation can be updated here. V3 docs: https://filamentphp.com/docs/3.x/notifications/sending-notifications#setting-body-text V2 docs: https://filamentphp.com/docs/2.x/notifications/sending-notifications#body
6 Replies
Povilas K
Povilas K9mo ago
I can confirm HTML, just tried:
Notification::make()
->title('Task marked as completed')
->body('Try **bold** and <b>HTML</b> in the body.')
->success()
->send();
Notification::make()
->title('Task marked as completed')
->body('Try **bold** and <b>HTML</b> in the body.')
->success()
->send();
No description
Dennis Koch
Dennis Koch9mo ago
->body(str()->markdown('...'))?
camya
camyaOP9mo ago
Great Dennis, thank you for the hint. This works for me.... Notification::make()->body(str('Updated **post** 123')->markdown())->send(); Maye you can add this info to the V3 docs too. Also, thank you, @PovilasKorop . I really appreciate your Laravel content. 🙂
Dennis Koch
Dennis Koch9mo ago
Are showing markdown somewhere? Or what do you think should be adjusted? The docs are inside the packages/ dir and you can send a PR if you want to improve something.

Did you find this page helpful?