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
JJSandersOP7mo ago
Anyone?
toeknee
toeknee7mo 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
JJSandersOP7mo 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
toeknee7mo ago
Yep exactly, simple custom page. Or an action rendering a view field
JJSanders
JJSandersOP7mo 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
Anik7mo ago
use tailwind classes
toeknee
toeknee6mo ago
Perfect
Want results from more Discord servers?
Add your server