{"id":18301960,"url":"https://github.com/filamentphp/spatie-laravel-settings-plugin","last_synced_at":"2025-04-12T18:52:46.875Z","repository":{"id":41518105,"uuid":"431872032","full_name":"filamentphp/spatie-laravel-settings-plugin","owner":"filamentphp","description":"[READ ONLY] Subtree split of the Filament spatie/laravel-settings Plugin (see filamentphp/filament)","archived":false,"fork":false,"pushed_at":"2025-04-02T09:55:12.000Z","size":152,"stargazers_count":73,"open_issues_count":0,"forks_count":9,"subscribers_count":4,"default_branch":"3.x","last_synced_at":"2025-04-04T00:07:11.955Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/filamentphp/filament","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/filamentphp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2021-11-25T14:21:14.000Z","updated_at":"2025-04-02T09:55:15.000Z","dependencies_parsed_at":"2022-07-20T04:02:29.145Z","dependency_job_id":"e2531075-3c4a-49c0-9fe4-b15e96742d42","html_url":"https://github.com/filamentphp/spatie-laravel-settings-plugin","commit_stats":{"total_commits":49,"total_committers":2,"mean_commits":24.5,"dds":0.04081632653061229,"last_synced_commit":"8801852aca7c4a66a289bb6e38e5fdee005946b3"},"previous_names":[],"tags_count":873,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filamentphp%2Fspatie-laravel-settings-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filamentphp%2Fspatie-laravel-settings-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filamentphp%2Fspatie-laravel-settings-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/filamentphp%2Fspatie-laravel-settings-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/filamentphp","download_url":"https://codeload.github.com/filamentphp/spatie-laravel-settings-plugin/tar.gz/refs/heads/3.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618243,"owners_count":21134200,"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","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":[],"created_at":"2024-11-05T15:17:32.836Z","updated_at":"2025-04-12T18:52:46.856Z","avatar_url":"https://github.com/filamentphp.png","language":"PHP","funding_links":[],"categories":["Integrations"],"sub_categories":[],"readme":"# Filament Spatie Settings Plugin\n\n## Installation\n\nInstall the plugin with Composer:\n\n```bash\ncomposer require filament/spatie-laravel-settings-plugin:\"^3.2\" -W\n```\n\n## Preparing your page class\n\nSettings pages are Filament pages that extend the `Filament\\Pages\\SettingsPage` class.\n\nThis package uses the [`spatie/laravel-settings` package](https://github.com/spatie/laravel-settings) to store and retrieve settings via the database.\n\nBefore you start, create a settings class in your `app/Settings` directory, and a database migration for it. You can find out more about how to do this in the [Spatie documentation](https://github.com/spatie/laravel-settings#usage).\n\nOnce you've created your settings class, you can create a settings page in Filament for it using the following command:\n\n```bash\nphp artisan make:filament-settings-page ManageFooter FooterSettings\n```\n\nIn this example, you have a `FooterSettings` class in your `app/Settings` directory.\n\nIn your new settings page class, generated in the `app/Filament/Pages` directory, you will see the static `$settings` property assigned to the settings class:\n\n```php\nprotected static string $settings = FooterSettings::class;\n```\n\n## Building a form\n\nYou must define a form schema to interact with your settings class inside the `form()` method.\n\nSince the [Form Builder](https://filamentphp.com/docs/forms) is installed in the Panel Builder by default, you may use any form [fields](https://filamentphp.com/docs/forms/fields) or [layout components](https://filamentphp.com/docs/forms/layout) you like:\n\n```php\nuse Filament\\Forms\\Components\\Repeater;\nuse Filament\\Forms\\Components\\TextInput;\nuse Filament\\Forms\\Form;\n\npublic function form(Form $form): Form\n{\n    return $form\n        -\u003eschema([\n            TextInput::make('copyright')\n                -\u003elabel('Copyright notice')\n                -\u003erequired(),\n            Repeater::make('links')\n                -\u003eschema([\n                    TextInput::make('label')-\u003erequired(),\n                    TextInput::make('url')\n                        -\u003eurl()\n                        -\u003erequired(),\n                ]),\n        ]);\n}\n```\n\nThe name of each form field must correspond with the name of the property on your settings class.\n\nThe form will automatically be filled with settings from the database, and saved without any extra work.\n\n## Publishing translations\n\nIf you wish to translate the package, you may publish the language files using:\n\n```bash\nphp artisan vendor:publish --tag=filament-spatie-laravel-settings-plugin-translations\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilamentphp%2Fspatie-laravel-settings-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffilamentphp%2Fspatie-laravel-settings-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffilamentphp%2Fspatie-laravel-settings-plugin/lists"}