{"id":37008894,"url":"https://github.com/elsayed85/nova-settings","last_synced_at":"2026-01-14T00:50:46.027Z","repository":{"id":65236054,"uuid":"588872666","full_name":"elsayed85/nova-settings","owner":"elsayed85","description":"This Laravel Nova settings tool based on env, using nativ nova fields and resources","archived":false,"fork":true,"pushed_at":"2023-01-14T10:08:57.000Z","size":179,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-04-22T19:10:12.456Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"stepanenko3/nova-settings","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elsayed85.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2023-01-14T10:08:37.000Z","updated_at":"2024-04-22T19:10:12.457Z","dependencies_parsed_at":"2023-02-09T19:16:32.723Z","dependency_job_id":null,"html_url":"https://github.com/elsayed85/nova-settings","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/elsayed85/nova-settings","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fnova-settings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fnova-settings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fnova-settings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fnova-settings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elsayed85","download_url":"https://codeload.github.com/elsayed85/nova-settings/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsayed85%2Fnova-settings/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28407236,"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":[],"created_at":"2026-01-14T00:50:45.496Z","updated_at":"2026-01-14T00:50:46.014Z","avatar_url":"https://github.com/elsayed85.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nova Settings\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/stepanenko3/nova-settings.svg?style=flat-square)](https://packagist.org/packages/stepanenko3/nova-settings)\n[![Total Downloads](https://img.shields.io/packagist/dt/stepanenko3/nova-settings.svg?style=flat-square)](https://packagist.org/packages/stepanenko3/nova-settings)\n[![License](https://poser.pugx.org/stepanenko3/nova-settings/license)](https://packagist.org/packages/stepanenko3/nova-settings)\n\n![screenshot of tool](screenshots/tool.png)\n\n## Description\n\nThis Laravel Nova settings tool based on env, using nativ nova fields and resources\n\n## Features\n\n- Using native Nova resources\n- Fully responsive\n- Dark mode support\n- Support all packages. Like nova-tabs, activity-log, etc.\n- Different settings depending on the current Env\n- Separation of settings into different classes\n- Customizable model and resource\n\n## Requirements\n\n- `php: \u003e=8.0`\n- `laravel/nova: ^4.0`\n\n## Installation\n\n```bash\n# Install the package\ncomposer require stepanenko3/nova-settings\n```\n\nPublish the config file:\n\n``` bash\nphp artisan vendor:publish --provider=\"Stepanenko3\\NovaSettings\\ToolServiceProvider\" --tag=\"config\"\n```\n\nPublish the migration file:\n\n``` bash\nphp artisan vendor:publish --provider=\"Stepanenko3\\NovaSettings\\ToolServiceProvider\" --tag=\"migrations\"\n```\n\nAnd run `php artisan migrate`\n\nNext up, you must register the tool with Nova. This is typically done in the `tools` method of the `NovaServiceProvider`.\n\n```php\n// in app/Providers/NovaServiceProvder.php\n\n// ...\n\npublic function tools()\n{\n    return [\n        // ...\n        new \\Stepanenko3\\NovaSettings\\NovaSettingsTool(),\n    ];\n}\n```\n\nCreate your own configuration classes in app/Nova/Settings\n\n```php\n// in app/Nova/Settings/Demo.php\n\n\u003c?php\n\nnamespace App\\Nova\\Settings;\n\nuse Laravel\\Nova\\Fields\\Boolean;\nuse Stepanenko3\\NovaSettings\\Types\\AbstractType;\n\nclass Demo extends AbstractType\n{\n    public function fields(): array\n    {\n        return [\n            Boolean::make('Param 1', 'param_1'),\n            Boolean::make('Param 2', 'param_2'),\n            Boolean::make('Param 3', 'param_3'),\n        ];\n    }\n}\n```\n\n### With Tabs\n\nIf you want to use eminiarts/nova-tabs\n\n`composer require eminiarts/nova-tabs`\n\n```php\n// in app/Nova/Settings/Demo.php\n\n\u003c?php\n\nnamespace App\\Nova\\Settings;\n\nuse Eminiarts\\Tabs\\Tab;\nuse Eminiarts\\Tabs\\Tabs;\nuse Laravel\\Nova\\Fields\\Boolean;\nuse Stepanenko3\\NovaSettings\\Types\\AbstractType;\n\nclass Demo extends AbstractType\n{\n    public function fields(): array\n    {\n        return [\n            Boolean::make('Param 1', 'param_1'),\n            Boolean::make('Param 2', 'param_2'),\n            Boolean::make('Param 3', 'param_3'),\n\n            new Tabs('Tabs 1', [\n                new Tab('Tab 1', [\n                    Boolean::make('Param 1', 'param_1'),\n                    Boolean::make('Param 2', 'param_2'),\n                    Boolean::make('Param 3', 'param_3'),\n                ]),\n                new Tab('Tab 2', [\n                    Boolean::make('Param 1', 'param_1'),\n                    Boolean::make('Param 2', 'param_2'),\n                    Boolean::make('Param 3', 'param_3'),\n                ]),\n                new Tab('Tab 3', [\n                    Boolean::make('Param 1', 'param_1'),\n                    Boolean::make('Param 2', 'param_2'),\n                    Boolean::make('Param 3', 'param_3'),\n                ]),\n            ]),\n        ];\n    }\n}\n```\n\nDelcare your settings class in `config/nova-settings.php`\n\n``` php\n\u003c?php\n\nreturn [\n    'model' =\u003e \\Stepanenko3\\NovaSettings\\Models\\Settings::class,\n\n    'resource' =\u003e \\Stepanenko3\\NovaSettings\\Resources\\Settings::class,\n\n    'types' =\u003e [\n        \\App\\Nova\\Settings\\Demo::class, // Add this line\n    ],\n];\n```\n\n## Usage\n\nClick on the `\"Settings\"` menu item in your Nova app to see the tool.\n\nUse helper function for access the settings\n``` php\n// settings(string|null $section, string|null $key = null, string|null $default = null, string|null $env = null)\nsettings('demo', 'key', 'defaultValue', config('app.env'))\n```\n\nGet `cart_link` value from `General` settings in current Env\n```php\nsettings('general', 'cart_link')\n```\n\nGet all `General` settings\n```php\nsettings('general')\n```\n\nGet `cart_link` value from `General` settings in specific Env with default value\n```php\nsettings(\n    section: 'general',\n    key: 'cart_link',\n    default: true,\n    env: 'production'\n);\n\n// OR\n\nsettings('general', 'cart_link', true, 'production');\n```\n\n## Configuration\n\nAll the configuration is managed from a single configuration file located in `config/nova-settings.php`\n\n### Extends default model\n\nCreate your own model that will extends `\\Stepanenko3\\NovaSettings\\Models\\Settings`\n\n```php\n// in app/Models/Settings.php\n\n\u003c?php\n\nnamespace App\\Models;\n\nuse Spatie\\Activitylog\\LogOptions;\nuse Spatie\\Activitylog\\Traits\\LogsActivity;\n\nclass Settings extends \\Stepanenko3\\NovaSettings\\Models\\Settings\n{\n    use LogsActivity;\n\n    public function getActivitylogOptions(): LogOptions\n    {\n        return LogOptions::defaults()\n            -\u003elogFillable()\n            -\u003elogOnlyDirty();\n    }\n}\n```\n\nDeclare your model `'model' =\u003e \\App\\Models\\Settings::class,` in `config/nova-settings.php`\n\n## Extends default Nova resource\n\nCreate your own resource that will extends `\\Stepanenko3\\NovaSettings\\Resources\\Settings`\n\n``` php\n// in app/Nova/Settings.php\n\n\u003c?php\n\nnamespace App\\Nova;\n\nuse Illuminate\\Http\\Request;\nuse Laravel\\Nova\\Fields\\HasMany;\n\nclass Settings extends \\Stepanenko3\\NovaSettings\\Resources\\Settings\n{\n    public function fields(Request $request)\n    {\n        return array_merge(parent::fields($request), [\n            HasMany::make('Activities', 'activities', 'App\\Nova\\ActivityLog'),\n        ]);\n    }\n}\n```\n\nDeclare your resource `'resource' =\u003e \\App\\Nova\\Settings::class,` in `config/nova-settings.php`\n\nDon't forget to create `App\\Nova\\ActivityLog`\n\n### Screenshots\n\n![screenshot of tool](screenshots/tool-dark.png)\n\n## Credits\n\n- [Artem Stepanenko](https://github.com/stepanenko3)\n\n## Contributing\n\nThank you for considering contributing to this package! Please create a pull request with your contributions with detailed explanation of the changes you are proposing.\n\n## License\n\nThis package is open-sourced software licensed under the [MIT license](LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsayed85%2Fnova-settings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felsayed85%2Fnova-settings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsayed85%2Fnova-settings/lists"}