{"id":16760630,"url":"https://github.com/tabuna/settings","last_synced_at":"2025-03-21T23:32:22.920Z","repository":{"id":43067865,"uuid":"47288613","full_name":"tabuna/settings","owner":"tabuna","description":"Simple key-value storage package for @Laravel","archived":false,"fork":false,"pushed_at":"2023-05-30T01:07:42.000Z","size":64,"stargazers_count":14,"open_issues_count":1,"forks_count":4,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-10-14T04:24:07.815Z","etag":null,"topics":["framework","laravel","settings","storage"],"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/tabuna.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-02T21:07:09.000Z","updated_at":"2024-01-31T16:53:25.000Z","dependencies_parsed_at":"2024-06-21T17:40:57.041Z","dependency_job_id":null,"html_url":"https://github.com/tabuna/settings","commit_stats":{"total_commits":80,"total_committers":4,"mean_commits":20.0,"dds":0.08750000000000002,"last_synced_commit":"9c6ccfd2b79bb8d05d14b243776274379688eb01"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabuna%2Fsettings","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabuna%2Fsettings/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabuna%2Fsettings/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabuna%2Fsettings/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tabuna","download_url":"https://codeload.github.com/tabuna/settings/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221820522,"owners_count":16886214,"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":["framework","laravel","settings","storage"],"created_at":"2024-10-13T04:24:06.734Z","updated_at":"2024-10-28T11:12:53.676Z","avatar_url":"https://github.com/tabuna.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Settings\n\n![Unit tests](https://github.com/legacy-orchid/settings/workflows/Unit%20tests/badge.svg)\n[![Latest Stable Version](https://poser.pugx.org/orchid/settings/v/stable)](https://packagist.org/packages/orchid/settings)\n[![Total Downloads](https://poser.pugx.org/orchid/settings/downloads)](https://packagist.org/packages/orchid/settings)\n[![License](https://poser.pugx.org/orchid/settings/license)](https://packagist.org/packages/orchid/settings)\n\n\nThe simplest persistent data store using a key to access a value.\n\n\n## Installation\n\nRun this at the command line:\n\n```php\n$ composer require orchid/settings\n```\n\nAfter do the migration:\n\n```php\n$ php artisan migrate\n```\n\n## Usage\n\nTo add a new value to the repository you need to use:\n\n```php\n\u003c?php\n\nuse Orchid\\Settings\\Setting;\n\nSetting::set($key, $value);\n```\n\nThe transferred value will be converted to JSON, and upon receipt, decoding will occur, this allows you to place not only simple types, but also arrays in the storage.\n\nTo get the value:\n```php\n\u003c?php\n\n/**\n* @param string|array $key\n* @param string|null $default\n*/\nSetting::get($key, $default);\n// or using the helper function\nsetting($key, $default);\n```\n\nBy default, each item cached before it is changed, in cases if you need to get a value not from the cache, you need to use the getNoCache method.\n\n```php\nSetting::getNoCache($key, $default = null);\n```\n\n\u003e **Note.** When transferring keys as an array, subsequent updates of values will not automatically flush the cache.\n\nTo delete a value:\n\n```php\n\u003c?php\n\n/**\n* @param string|array $key\n* @param string|null $default\n*/\nSetting::forget($key);\n```\n\nPlease note that you can get or delete several values from the repository at once, for this you need to pass an array with the names of the keys as the first argument.\n\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%2Ftabuna%2Fsettings","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftabuna%2Fsettings","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftabuna%2Fsettings/lists"}