Layup is built to be extended. The defaults work out of the box, but most non-trivial use cases will hit one or more of these customization points. This page is a map: pick what you want to change and jump to the guide.
I want to...
| Goal | Guide | Config or API |
|---|---|---|
| Embed the field on my own model | Embedding the field | LayupBuilder::make('content') |
| Disable the bundled Pages resource entirely | Disable the Pages resource | pages.enabled = false |
| Use a custom Page model (multi-dashboard, custom table) | Swapping the Page model | pages.model |
| Add or remove widgets in the picker | Filament plugin API and Extending widgets | ->widgets(), ->withoutWidgets() |
| Build my own widget from scratch | Custom widgets | php artisan layup:make-widget |
| Make a widget render through Livewire | Livewire-rendered widgets | BaseLivewireWidget |
| Override the page render template / layout | Frontend rendering | frontend.layout, frontend.view |
| Add a custom page template | Page templates | page_layout.templates |
| Change colors, fonts, or border radius | Theme system and Filament plugin API | ->colors(), ->fonts(), ->borderRadius() |
| Customize SEO meta tags / structured data | SEO and meta tags | seo.* config |
| Hook the Tailwind safelist into my build | Tailwind safelist | safelist.* config, SafelistChanged event |
| Add lifecycle hooks to a widget | Custom widgets | onCreate, onSave, onDelete, onDuplicate |
| Render Layup content outside the built-in routes | Rendering content | @layup, HasLayupContent, <x-layup-widget> |
| Test my custom widgets | Testing | LayupAssertions trait |
Two starting points
Most customization questions reduce to one of two scenarios:
You want the field, not the CMS. You have your own models, your own routing, your own front-end. Read Embedding the field and Disable the Pages resource. Skip the Pages-related guides.
You want to extend the bundled CMS. You like the Pages resource but want different widgets, theme, or rendering. Start with Filament plugin API, then move on to Frontend rendering, Page templates, and Theme system.
Contributors
Thank you to everyone who has contributed to this package. Every pull request, bug report, and idea makes a difference.