{"id":38490433,"url":"https://github.com/emresari89/laravel-options","last_synced_at":"2026-01-17T05:41:57.750Z","repository":{"id":45287871,"uuid":"345278926","full_name":"emresari89/laravel-options","owner":"emresari89","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-06T04:47:53.000Z","size":27,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-30T16:27:49.461Z","etag":null,"topics":["database","global-options","laravel","settings","site-settings"],"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/emresari89.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-07T06:52:45.000Z","updated_at":"2025-02-06T04:47:27.000Z","dependencies_parsed_at":"2022-08-04T02:30:26.430Z","dependency_job_id":null,"html_url":"https://github.com/emresari89/laravel-options","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/emresari89/laravel-options","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emresari89%2Flaravel-options","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emresari89%2Flaravel-options/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emresari89%2Flaravel-options/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emresari89%2Flaravel-options/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emresari89","download_url":"https://codeload.github.com/emresari89/laravel-options/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emresari89%2Flaravel-options/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28500845,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T04:31:57.058Z","status":"ssl_error","status_checked_at":"2026-01-17T04:31:45.816Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["database","global-options","laravel","settings","site-settings"],"created_at":"2026-01-17T05:41:57.549Z","updated_at":"2026-01-17T05:41:57.739Z","avatar_url":"https://github.com/emresari89.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Laravel Options\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/emresari89/laravel-options.svg?style=flat-square)](https://packagist.org/packages/emresari89/laravel-options)\n[![Total Downloads](https://img.shields.io/packagist/dt/emresari89/laravel-options.svg?style=flat-square)](https://packagist.org/packages/emresari89/laravel-options)\n[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)\n[![Build Status](https://travis-ci.org/emresari89/laravel-options.svg?branch=master)](https://travis-ci.org/emresari89/laravel-options)\n\nGlobal key-value store in the database\n\n## Installation\n\nTo get started with laravel-options, use Composer to add the package to your project's dependencies:\n\n```bash\ncomposer require emresari89/laravel-options\n```\n\n### Publish, migrate\n\nBy running `php artisan vendor:publish --provider=\"Emresari\\Options\\OptionsServiceProvider\"` in your project all files for this package will be \npublished.\nFor this package, it's only a migration. Run `php artisan migrate` to migrate the table. There will now be an `options` table in your database.\n\n## Usage\n\nWith the `option()` helper, we can get and set options:\n\n```php\n// Get all options \noptions();\n\n// Get option by id\noptionID($id);\n\n// Get option\noption('someKey');\n\n// Get option, with a default fallback value if the key doesn't exist\noption('someKey', 'Some default value if the key is not found');\n\n// Set option\noption(['someKey' =\u003e 'someValue']);\n\n// Set option with type (type 1 default)\noption_type(['someKey' =\u003e 'someValue'],null,2);\n\n// Remove option\noption()-\u003eremove('someKey');\n\n// Check the option exists\noption_exists('someKey');\n```\n\nIf you want to check if an option exists, you can use the facade:\n\n```php\nuse Option;\n\n$check = Option::exists('someKey');\n```\n\n### Console\n\nIt is also possible to set options within the console:\n\n```bash\nphp artisan option:set {someKey} {someValue}\n```\n\n## Testing\n\n```bash\n$ composer test\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%2Femresari89%2Flaravel-options","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femresari89%2Flaravel-options","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femresari89%2Flaravel-options/lists"}