Small documentation page

Hello everyone, I was asked by my client to build a page / popup where the admin can write some usage instructions for the application and the users can read this instructions. It doesn't need to be sophisticated it can be just a HTML field which is then represented to the end user as html. Before I decide to build this myself, I was wondering if there is already a plugin for this .
7 Replies
JJSanders
JJSandersOP8mo ago
Anyone?
toeknee
toeknee8mo ago
No plugin... but it should just take 5 minutes with a basic filament action saving a value to the database? Or use the Laravel Setting plugin and just saving the value.
JJSanders
JJSandersOP8mo ago
Good idea. How should I show it to the users? Can I make a menu item that just shows an empty page with the formatted html text?
toeknee
toeknee8mo ago
Yep exactly, simple custom page. Or an action rendering a view field
JJSanders
JJSandersOP8mo ago
I managed to get it working:
protected function getHeaderActions(): array
{
return [
Action::make('manual')
->label('Handleiding')
->modalHeading('Handleiding')
->modalSubmitAction(false)
->modalCancelAction(false)
->modalWidth()

->modalContent(fn (GeneralSettings $settings): View => view(
'filament.pages.dashboard-manual',
['manual' => $settings?->manual])
)
];
}
protected function getHeaderActions(): array
{
return [
Action::make('manual')
->label('Handleiding')
->modalHeading('Handleiding')
->modalSubmitAction(false)
->modalCancelAction(false)
->modalWidth()

->modalContent(fn (GeneralSettings $settings): View => view(
'filament.pages.dashboard-manual',
['manual' => $settings?->manual])
)
];
}
In my view I have
<div>
{!! $manual !!}
</div>
<div>
{!! $manual !!}
</div>
How can I get nice html styling?
Anik
Anik8mo ago
use tailwind classes
toeknee
toeknee8mo ago
Perfect

Did you find this page helpful?