banulakwin / filament-page-builder
Filament admin panel for banulakwin/laravel-page-builder CMS content.
Package info
github.com/banulalakwindu/filament-page-builder
pkg:composer/banulakwin/filament-page-builder
1.0.1
2026-05-18 08:36 UTC
Requires
- php: ^8.2
- banulakwin/laravel-page-builder: ^1.0
- filament/filament: ^5.0
- illuminate/contracts: ^11.0|^12.0|^13.0
- illuminate/database: ^11.0|^12.0|^13.0
- illuminate/support: ^11.0|^12.0|^13.0
Requires (Dev)
- laravel/pint: ^1.21
- orchestra/testbench: ^9.0|^10.0|^11.0
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^11.0|^12.0
README
Reusable Filament admin package for CMS content managed by banulakwin/laravel-page-builder.
Requirements
- PHP
^8.2 - Laravel
^11.0|^12.0|^13.0 - Filament
^5.0 banulakwin/laravel-page-builder^1.0
Installation
composer require banulakwin/filament-page-builder
Register plugin in your panel:
use Banulakwin\FilamentPageBuilder\FilamentPageBuilderPlugin; ->plugins([ FilamentPageBuilderPlugin::make(), ])
Features
- CMS resource for
page_contentswith page-wise browsing and section grouping. - Shows only keys currently defined in
PageRegistry::all()(stale DB rows are hidden). - Toolbar page selector with Filament-native dropdown UX and auto-apply.
- Section groups are collapsible and collapsed by default.
- Human-friendly labels for page and section slugs.
- Type-aware editing for:
- scalar fields:
text,textarea,url,color,image,richtext groupfields: schema-driven nested fields from config (supports nestedgroup/repeater)repeaterfields: schema-driven item rows from config (supports nestedgroup/repeater)
- scalar fields:
- Repeater rows auto-generate configured fields when a new item is added.
Runtime assumptions
- Host app uses
banulakwin/laravel-page-builder. - Page definitions come from
app/Cms/Pages/*.php(or configured page-builder path). - Field values are persisted in
page_contents.value(JSON for repeaters/groups).
Current UI behavior
- List page:
- page selector in toolbar (
Pagedropdown) - grouped by
section - grouping controls hidden to keep UX simple
- page selector in toolbar (
- Edit page:
groupfields open as schema-driven nested fields from configrepeaterfields open as schema-driven item rows from config- scalar fields use a type-aware component (
url,color,image,richtext, etc.)
Notes
- For repeater/group nested subfields, this package supports recursive JSON persistence while keeping config-defined shape.
- If a custom field type needs a specialized component (e.g. media picker), extend the field component resolver in
EditPageBuilderContent.
Reusable helpers CommonImageUpload and CommonRichEditor under Banulakwin\FilamentPageBuilder\Schemas may be imported in app Filament forms.
Testing
composer test # Run PHPUnit composer pint # Fix code style composer phpstan # Static analysis composer quality # Run all (pint + phpstan + test)
Changelog
See CHANGELOG.md for details.
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/your-feature) - Run
composer qualityto ensure tests and style pass - Commit and push
- Open a pull request
Package layout (reference)
src/
FilamentPageBuilderPlugin.php
FilamentPageBuilderServiceProvider.php
Resources/PageBuilderContents/
PageBuilderContentResource.php
Pages/
ListPageBuilderContents.php
EditPageBuilderContent.php
ViewPageBuilderContent.php
Schemas/
PageBuilderContentForm.php
PageBuilderContentInfolist.php
Tables/
PageBuilderContentsTable.php
Schemas/
CommonImageUpload.php
CommonRichEditor.php
License
MIT — see LICENSE for details.