{"id":28943993,"url":"https://github.com/painlesscode/laravel-dynamic-config","last_synced_at":"2026-05-19T07:33:21.363Z","repository":{"id":57035138,"uuid":"313216905","full_name":"painlesscode/laravel-dynamic-config","owner":"painlesscode","description":"A laravel package to control configuration dynamically","archived":false,"fork":false,"pushed_at":"2020-12-06T14:14:49.000Z","size":24,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-29T03:58:12.758Z","etag":null,"topics":["configuration","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/painlesscode.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-16T07:03:30.000Z","updated_at":"2023-06-21T21:15:00.000Z","dependencies_parsed_at":"2022-08-23T20:50:47.420Z","dependency_job_id":null,"html_url":"https://github.com/painlesscode/laravel-dynamic-config","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/painlesscode/laravel-dynamic-config","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/painlesscode%2Flaravel-dynamic-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/painlesscode%2Flaravel-dynamic-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/painlesscode%2Flaravel-dynamic-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/painlesscode%2Flaravel-dynamic-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/painlesscode","download_url":"https://codeload.github.com/painlesscode/laravel-dynamic-config/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/painlesscode%2Flaravel-dynamic-config/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33206320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-19T07:16:55.748Z","status":"ssl_error","status_checked_at":"2026-05-19T07:16:54.366Z","response_time":58,"last_error":"SSL_read: 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":["configuration","laravel"],"created_at":"2025-06-23T05:16:15.219Z","updated_at":"2026-05-19T07:33:21.332Z","avatar_url":"https://github.com/painlesscode.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Dynamic Config\n\n[![PHP Composer test](https://github.com/painlesscode/laravel-dynamic-config/workflows/PHP%20Composer/badge.svg)](https://github.com/painlesscode/laravel-dynamic-config/actions?query=workflow%3A%22PHP+Composer%22)\n[![License](https://img.shields.io/github/license/painlesscode/laravel-dynamic-config)](https://github.com/painlesscode/laravel-dynamic-config/blob/master/license.md)\n\n\n## Introduction\nThis Package allow users to have their configuration stored in database, makes it easy to customize.\nSupport cache for faster access.\n\n## Installation\nYou can install the package via composer:\n``` bash\ncomposer require painlesscode/laravel-dynamic-config\n```\npublish the config with:\n\n``` bash\nphp artisan vendor:publish --provider=\"Painless\\DynamicConfig\\DynamicConfigServiceProvider\"\n```\n \n## Usage\n\nYou just need to decide which config file(s) you want them to be dynamically editable by appending file name to `dynamic_configs` array :\n```php\n# /config/dynamic_config.php \nreturn [\n    'dynamic_configs' =\u003e [\n        'mail',\n    ],\n];\n```\n\n\u003e * `mail` is added at `dynamic_config` array for testing purpose. You are free to remove it, if you don't need it.\n\u003e * The default values will be taken from the actual config file.\n\u003e * Adding `dynamic_config` to the `dynamic_configs` array have no effect.\n\u003e * You can enable cache for faster access. To enable cache dynamic configuration. just edit `enable_cache` key of `dynamic_config.php` file to `true`.\n\u003e * Cache file will be stored at `bootstrap/cache/dynamic_config.php` file. You can change the cache file name by editing `cache_file_name` key of of `dynamic_config.php` file. \n\n\n#### Getting Dynamic Config Value\n\n```php\necho config('mail.default'); \n// Will return the value of dynamic mail.default (if mail is already added to dynamic_configs array);\n```\n\n#### Getting Original Config Value\n\n```php\necho config('defailt.mail.default'); \n// Will return the value of original configuration (if default_prefix is set to 'default');\n```\n\n#### Setting Dynamic Config Value\n\n```php\nconfig('mail.default', 'array'); \n// It is like default laravel config set. it will be set but persists in only current request.\n\n// to set value permanently\nuse Painless\\DynamicConfig\\Facades\\DynamicConfig; \n\n// or you can use DynamicConfig Alias\n\nDynamicConfig::set('mail.default', 'ses'); \n// It will save the value and persist it in database and cache (if enabled)\n```\n\n#### Revert config value\nto revert a config value to its original state:\n```php\nuse Painless\\DynamicConfig\\Facades\\DynamicConfig; \n// or you can use DynamicConfig Alias\n\nDynamicConfig::revert('mail.default', 'ses'); \n// It will revert the config value to its original state and persist it. \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpainlesscode%2Flaravel-dynamic-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpainlesscode%2Flaravel-dynamic-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpainlesscode%2Flaravel-dynamic-config/lists"}