{"id":23219191,"url":"https://github.com/solutionforest/filament-field-group","last_synced_at":"2025-08-19T08:32:50.819Z","repository":{"id":252341443,"uuid":"839779322","full_name":"solutionforest/filament-field-group","owner":"solutionforest","description":"Filament Field Group is a powerful Laravel package that enhances Filament's form building capabilities. It allows you to easily group and organize form fields","archived":false,"fork":false,"pushed_at":"2025-08-12T03:38:07.000Z","size":628,"stargazers_count":24,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-08-12T05:32:27.574Z","etag":null,"topics":["filament","filamentphp","filamentphp-plugin","laravel"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"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/solutionforest.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"solutionforest"}},"created_at":"2024-08-08T10:00:42.000Z","updated_at":"2025-08-12T03:38:11.000Z","dependencies_parsed_at":"2024-10-19T08:39:05.419Z","dependency_job_id":"a6cfc8e3-8994-40a9-bd80-d04562a31993","html_url":"https://github.com/solutionforest/filament-field-group","commit_stats":null,"previous_names":["solutionforest/filament-field-group"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/solutionforest/filament-field-group","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionforest%2Ffilament-field-group","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionforest%2Ffilament-field-group/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionforest%2Ffilament-field-group/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionforest%2Ffilament-field-group/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solutionforest","download_url":"https://codeload.github.com/solutionforest/filament-field-group/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solutionforest%2Ffilament-field-group/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271121771,"owners_count":24702871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["filament","filamentphp","filamentphp-plugin","laravel"],"created_at":"2024-12-18T21:20:06.366Z","updated_at":"2025-08-19T08:32:50.809Z","avatar_url":"https://github.com/solutionforest.png","language":"PHP","funding_links":["https://github.com/sponsors/solutionforest"],"categories":[],"sub_categories":[],"readme":"\n## About Solution Forest\n\n[Solution Forest](https://solutionforest.com) Web development agency based in Hong Kong. We help customers to solve their problems. We Love Open Soruces. \n\nWe have built a collection of best-in-class products:\n\n- [VantagoAds](https://vantagoads.com): A self manage Ads Server, Simplify Your Advertising Strategy.\n- [GatherPro.events](https://gatherpro.events): A Event Photos management tools, Streamline Your Event Photos.\n- [Website CMS Management](https://filamentphp.com/plugins/solution-forest-cms-website): Website CMS Management - Filament CMS Plugin\n- [Filaletter](https://filaletter.solutionforest.net): Filaletter - Filament Newsletter Plugin\n\n# Filament Field Group\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/solution-forest/filament-field-group.svg?style=flat-square)](https://packagist.org/packages/solution-forest/filament-field-group)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/solutionforest/filament-field-group/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/solutionforest/filament-field-group/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/solutionforest/filament-field-group/fix-php-code-styling.yml?branch=main\u0026label=code%20style\u0026style=flat-square)](https://github.com/solutionforest/filament-field-group/actions?query=workflow%3A\"Fix+PHP+code+styling\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/solution-forest/filament-field-group.svg?style=flat-square)](https://packagist.org/packages/solution-forest/filament-field-group)\n\n\nFilament Field Group is a powerful Laravel package that enhances Filament's form building capabilities. It allows you to easily group and organize form fields, improving the structure and readability of your forms. With this package, you can create collapsible sections, tabs, or custom layouts for your form fields, making complex forms more manageable and user-friendly.\n\n\n## Supported Filament versions\n| Filament Version | Plugin Version |\n|------------------|----------------|\n| v3               | 1.x.x          |\n| v4               | 2.x.x    |\n\n## Installation\n\n1. You can install the package via composer:\n    ```bash\n    composer require solution-forest/filament-field-group\n    ```\n2. Register the plugin in your Panel provider\n   ```php\n    use SolutionForest\\FilamentFieldGroup\\FilamentFieldGroupPlugin;\n\n    class AdminPanelProvider extends PanelProvider\n    {\n        public function panel(Panel $panel): Panel\n        {\n            return $panel\n                -\u003eplugin(FilamentFieldGroupPlugin::make());\n        }\n    }\n   ```\n3. Then execute the following commands:\n    ```bash\n    php artisan filament-field-group:install\n    ```\n\n## Publish Config, View, Translation and Migration\nYou can publish and run the migrations with:\n\n```bash\nphp artisan vendor:publish --tag=\"filament-field-group-migrations\"\nphp artisan migrate\n```\n\nYou can publish the config file with:\n\n```bash\nphp artisan vendor:publish --tag=\"filament-field-group-config\"\n```\n\nOptionally, you can publish the views using\n\n```bash\nphp artisan vendor:publish --tag=\"filament-field-group-views\"\n```\n\nThis is the contents of the published config file:\n\n```php\nreturn [\n    'enabled' =\u003e false,\n    'models' =\u003e [\n        'field' =\u003e \\SolutionForest\\FilamentFieldGroup\\Models\\Field::class,\n        'field_group' =\u003e SolutionForest\\FilamentFieldGroup\\Models\\FieldGroup::class,\n    ],\n    'table_names' =\u003e [\n        'fields' =\u003e 'advanced_fields',\n        'field_groups' =\u003e 'advanced_field_groups',\n    ],\n];\n```\n\n## Usage\n\n1. Add `FilamentFieldGroupPlugin` to you panel.\n2. Enable the Field Group resource by setting `enabled` to `true` in the config file:\n```php\n\n// config/filament-field-group.php\nreturn [\n    'enabled' =\u003e true,\n    // ... other config options\n];\n```\nOr enable the plugin on `FilamentFieldGroupPlugin`\n```php\nuse SolutionForest\\FilamentFieldGroup\\FilamentFieldGroupPlugin;\n \n$panel\n    -\u003eplugin(FilamentFieldGroupPlugin::make()-\u003eenablePlugin());\n```\n![Filament Field Group](https://github.com/solutionforest/filament-field-group/raw/main/docs-assets/images/initial-resource.png)\n\n3. Create field groups and fields, for example:\n\n   - Navigate to the Field Group resource in your Filament admin panel.\n   - Create a new field group (e.g., \"User Basic Info\").\n   - Add fields to the group (e.g., name, email, etc.).\n![Create Field Group and Field](https://github.com/solutionforest/filament-field-group/raw/main/docs-assets/images/add-field-1.png)\n![Create Field Group and Field](https://github.com/solutionforest/filament-field-group/raw/main/docs-assets/images/add-field-2.png)\n![Create Field Group and Field](https://github.com/solutionforest/filament-field-group/raw/main/docs-assets/images/add-field-3.png)\n\n4. Apply field groups to your form schema:\n```php\n\nuse SolutionForest\\FilamentFieldGroup\\Facades\\FilamentFieldGroup;\n\npublic static function form(Form $form): Form\n{\n    return $form\n        -\u003ecolumns(1)\n        -\u003eschema([\n            FilamentFieldGroup::findFieldGroup('user_basic'),\n            FilamentFieldGroup::findFieldGroup('user_detail'),\n        ]);\n}\n```\n![Apply Field Group](https://github.com/solutionforest/filament-field-group/raw/main/docs-assets/images/apply-field-group.png)\n   \n## Available Components\n\nCurrently, this package provides the following components:\n\n- Text\n- TextArea\n- Email\n- Password\n- Number\n- Url\n- Select\n- Toggle\n- Radio\n- File\n- Image\n- Color Picker\n- DateTime Picker\n\nMore components can be added in the future. Feel free to submit a pull request if you have ideas for additional components!\n\n\n## Advanced Usage\n### Custom Resources\nYou can call `resources` on `FilamentFieldGroupPlugin` to add/replace original resource:\n```php\nuse SolutionForest\\FilamentFieldGroup\\FilamentFieldGroupPlugin;\n \n$panel\n    -\u003eplugin(FilamentFieldGroupPlugin::make()\n        -\u003eresources([\n            // your resource\n        ], override: true)\n    );\n```\n\n### Custom Field Types\n\nYou can add your own custom field types by following these steps:\n\n1. Create a field type class that extends `SolutionForest\\FilamentFieldGroup\\FieldTypes\\Configs\\FieldTypeBaseConfig`\n2. Implement the required methods, particularly `getFormSchema()` which defines the form fields\n3. Register your custom field type using one of the methods below:\n\n```php\n// Option 1: On Your Filament Panel\n\nuse SolutionForest\\FilamentFieldGroup\\FilamentFieldGroupPlugin;\n\n$panel\n    -\u003eplugin(FilamentFieldGroupPlugin::make()\n        -\u003efieldTypeConfigs([\n            // your field type config\n        ], override: true)\n    );\n```\n\n```php\n// Option 2: On Your AppServiceProvider\n\nuse SolutionForest\\FilamentFieldGroup\\Facades\\FilamentFieldGroup;\n\npublic function boot(): void\n{\n    FilamentFieldGroup::fieldTypeConfigs([\n        \\Your\\Custom\\FieldType::class\n    ], override: true);\n}\n```\n\nTo completely replace all default field types, set the `override` parameter to `true`.\n\n#### Customizing Field Type Config Form\n\nYou can customize the `config` form for specific field types by adding your own custom options. This is useful when you need to extend the functionality of existing field types with additional **configuration parameters**.\n\n```php\n// In AppServiceProvider.php boot() method\nuse SolutionForest\\FilamentFieldGroup\\Facades\\FilamentFieldGroup;\n\npublic function boot(): void\n{\n    FilamentFieldGroup::configureFieldTypeConfigFormUsing(\n        \\SolutionForest\\FilamentFieldGroup\\FieldTypes\\Configs\\Text::class,\n        function ($field, array $schema) {\n            return [\n                ...$schema,\n                // Your additional config form fields\n                Toggle::make('datalist'),\n                // More custom configuration options...\n            ];\n        }\n    );\n}\n```\n\nThis allows you to modify the configuration form for field types while preserving all the default options.\n\n\n### Custom Models\n\nYou can set custom models for field groups and fields in your `AppServiceProvider`:\n\n```php\n// In AppServiceProvider.php boot() method\nuse SolutionForest\\FilamentFieldGroup\\Facades\\FilamentFieldGroup;\n\npublic function boot(): void\n{\n    FilamentFieldGroup::setFieldGroupModelClass(Your\\Models\\FieldGroup::class);\n    FilamentFieldGroup::setFieldModelClass(Your\\Models\\Field::class);\n}\n```\n\n### Field Type Mixins\n\nYou can extend field type functionality using the `mixin` method on `FieldTypeBaseConfig`. This allows you to reuse field configuration logic across different field types:\n\n```php\nuse SolutionForest\\FilamentFieldGroup\\FieldTypes\\Configs\\FieldTypeBaseConfig;\n\nclass MyFieldTypeMixin\n{\n    public function addValidationRules()\n    {\n        return function (array $rules = []) {\n            return array_merge($rules, ['required', 'string']);\n        };\n    }\n    \n    public function addHelperText()\n    {\n        return function () {\n            return 'This is a helper text for all fields using this mixin';\n        };\n    }\n}\n\n// Apply the mixin to your field type\nFieldTypeBaseConfig::mixin(new MyFieldTypeMixin());\n```\n\nYou can also apply mixins to specific field type classes:\n\n```php\nuse SolutionForest\\FilamentFieldGroup\\FieldTypes\\Configs\\Text;\n\n// Apply mixin only to Text fields\nText::mixin(new TextFieldSpecificMixin());\n```\n\nThis approach helps maintain DRY code by centralizing common field configurations that can be shared across multiple field types.\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.\n\nWe welcome contributions to enhance this package. More components can potentially be added, so feel free to submit a pull request with your ideas or improvements.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [alan](https://github.com/solutionforest)\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%2Fsolutionforest%2Ffilament-field-group","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolutionforest%2Ffilament-field-group","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolutionforest%2Ffilament-field-group/lists"}