{"id":37014337,"url":"https://github.com/klisica/filament-builder-blocks","last_synced_at":"2026-01-14T01:25:15.505Z","repository":{"id":241542583,"uuid":"806743386","full_name":"klisica/filament-builder-blocks","owner":"klisica","description":"🏗️ A Simpler Web CMS Builder for Laravel Filament","archived":false,"fork":false,"pushed_at":"2025-08-05T01:37:39.000Z","size":73,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-05T03:22:36.635Z","etag":null,"topics":["cms","filament","laravel"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/klisica.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"klisica"}},"created_at":"2024-05-27T20:06:27.000Z","updated_at":"2025-08-05T01:37:37.000Z","dependencies_parsed_at":"2024-07-09T00:14:21.147Z","dependency_job_id":"0efa4caf-589e-4fe3-8957-7f4224050360","html_url":"https://github.com/klisica/filament-builder-blocks","commit_stats":null,"previous_names":["klisica/filament-builder-blocks"],"tags_count":1,"template":false,"template_full_name":"spatie/package-skeleton-laravel","purl":"pkg:github/klisica/filament-builder-blocks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klisica%2Ffilament-builder-blocks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klisica%2Ffilament-builder-blocks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klisica%2Ffilament-builder-blocks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klisica%2Ffilament-builder-blocks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klisica","download_url":"https://codeload.github.com/klisica/filament-builder-blocks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klisica%2Ffilament-builder-blocks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28407696,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T00:40:43.272Z","status":"ssl_error","status_checked_at":"2026-01-14T00:40:42.636Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cms","filament","laravel"],"created_at":"2026-01-14T01:25:14.856Z","updated_at":"2026-01-14T01:25:15.492Z","avatar_url":"https://github.com/klisica.png","language":"PHP","funding_links":["https://github.com/sponsors/klisica"],"categories":[],"sub_categories":[],"readme":"# Filament Builder Blocks\n\n### 🏗️ A Simpler Web CMS Builder for Laravel Filament\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/klisica/filament-builder-blocks.svg?style=flat-square)](https://packagist.org/packages/klisica/filament-builder-blocks)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/klisica/filament-builder-blocks/fix-php-code-style-issues.yml?branch=main\u0026label=code%20style\u0026style=flat-square)](https://github.com/klisica/filament-builder-blocks/actions?query=workflow%3A\"Fix+PHP+code+style+issues\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/klisica/filament-builder-blocks.svg?style=flat-square)](https://packagist.org/packages/klisica/filament-builder-blocks)\n[![GitHub License](https://img.shields.io/github/license/klisica/filament-builder-blocks.svg?style=flat-square)](https://github.com/klisica/filament-builder-blocks/blob/main/LICENSE)\n\n## Create, manage \u0026 customize\nBy re-using Filament's [Builder Input](https://filamentphp.com/docs/3.x/forms/fields/builder) this package enables you to create **custom section blocks as PHP classes** (i.e. `DefaultHeader.php`) enabling you to use all features supported in Filament.\n\nEach section block uses his own **blade view file** (i.e. `default-header.blade.php`) with support for dynamic data binded in PHP classes.\n\nAnother great helper functions that are ready-to-use:\n\n- `renderSections(...)` - Returns a fully formatted HTML code for each section,\n- `cleanup(...)` - Cleans unused attributes and values on store and update methods on filaments Create and Edit pages.\n\n\u003cbr /\u003e\n\n## Installation\n\n1. Require the package via composer:\n\n```bash\ncomposer require klisica/filament-builder-blocks\n```\n\n2. Install it to publish the config file:\n\n```bash\nphp artisan filament-builder-blocks:install\n```\n\n3. Open the `config/filament-builder-blocks.php` file and set the `path` value to root destination where you'll have you PHP classes (or leave it as it is).\n\n4. Run make section command to create your first example section class with the blade view file:\n\n```bash\nphp artisan make:section Hero\n```\n\n\u003cbr /\u003e\n\n## Default folder structure example\n\nMain section `Hero.php` will be displayed in builder dropdown, while child sections `ExampleHero.php` and `AdvancedHero.php` will be displayed as toggle buttons.\n\n```\n├── app\n│   ├── Sections\n│   │   ├── Header\n│   │   │   ├── ExampleHero.php\n│   │   │   ├── AdvancedHero.php\n│   │   │\n│   │   ├── Hero.php\n```\n\nCreating layouts for each section block component.\n\n```\n├── resources\n│   ├── views\n│   │   ├── sections\n│   │   │   ├── example-hero.blade.php\n│   │   │   ├── advanced-hero.blade.php\n```\n\n\u003e [!NOTE]\n\u003e To be sure that on running the `cleanup()` helper your data won't be remove use the **`content.`** prefix on `make` input methods. This is used a handler to avoid storing inputs that you still need to show for descpritive purposes (i.e. Placeholder component). Take the `ExampleHero.php` as example:\n\n```php\nclass ExampleHero extends AbstractSectionItemProvider\n{\n    public function getFieldset(): Fieldset\n    {\n        return Fieldset::make($this-\u003egetName())\n            -\u003eschema([\n                Placeholder::make('contact_links')-\u003ecolumnSpanFull(),  // Will get cleared out.\n                TextInput::make('content.heading'),    // Will keep on save methods.\n            ]);\n    }\n}\n\n```\n\nExample for adding cleanup on some Filaments Resource Edit Page:\n\n```php\nprotected function mutateFormDataBeforeSave(array $data): array\n{\n    return (new FilamentBuilderBlocks)-\u003ecleanup($data);\n}\n```\n\n\u003cbr /\u003e\n\n## Rendering components\n\n1. Build sections in controller:\n\n```php\n$sections = (new FilamentBuilderBlocks)-\u003erenderSections(\n    sections: $pages-\u003econtent,    // Page sections stored in content column\n    wrappingSections: $layout-\u003econtent    // Layout sections stored in content column (includes the `yield` field),\n    configs: ['page' =\u003e $page, 'layout' =\u003e $layout]    // Can be whatever you need to bind in `blade.php` files\n);\n\nreturn view('dynamic')-\u003ewith('sections', $sections);\n```\n\n2. Display them in a `dynamic.blade.php` (or whatever you name it) file:\n\n```php\n@foreach($sections as $section)\n    {!! $section !!}\n@endforeach\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Credits\n\n- [Krševan Lisica](https://github.com/klisica)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklisica%2Ffilament-builder-blocks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklisica%2Ffilament-builder-blocks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklisica%2Ffilament-builder-blocks/lists"}