{"id":21881472,"url":"https://github.com/aurorawebsoftware/asetting","last_synced_at":"2025-08-21T07:15:59.760Z","repository":{"id":219752302,"uuid":"748552216","full_name":"AuroraWebSoftware/ASetting","owner":"AuroraWebSoftware","description":"ASetting is a Laravel package that allows you to dynamically define your config definitions.","archived":false,"fork":false,"pushed_at":"2024-12-11T13:39:11.000Z","size":994,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-18T22:53:21.443Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/AuroraWebSoftware.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","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,"zenodo":null},"funding":{"github":"AuroraWebSoftware"}},"created_at":"2024-01-26T08:30:11.000Z","updated_at":"2024-12-11T13:39:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"10fd7c7c-82b9-428f-8dfd-db88170d1cbf","html_url":"https://github.com/AuroraWebSoftware/ASetting","commit_stats":null,"previous_names":["aurorawebsoftware/asetting"],"tags_count":5,"template":false,"template_full_name":"spatie/package-skeleton-laravel","purl":"pkg:github/AuroraWebSoftware/ASetting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AuroraWebSoftware%2FASetting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AuroraWebSoftware%2FASetting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AuroraWebSoftware%2FASetting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AuroraWebSoftware%2FASetting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AuroraWebSoftware","download_url":"https://codeload.github.com/AuroraWebSoftware/ASetting/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AuroraWebSoftware%2FASetting/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271442145,"owners_count":24760353,"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","status":"online","status_checked_at":"2025-08-21T02:00:08.990Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-11-28T09:19:03.594Z","updated_at":"2025-08-21T07:15:59.716Z","avatar_url":"https://github.com/AuroraWebSoftware.png","language":"PHP","funding_links":["https://github.com/sponsors/AuroraWebSoftware"],"categories":[],"sub_categories":[],"readme":"# ASetting Laravel Package\n![A2AD6A93-7ED8-4793-BB24-F9CEDDDD45F4-21632-000042AB3BFCB4B4.png](assets%2FA2AD6A93-7ED8-4793-BB24-F9CEDDDD45F4-21632-000042AB3BFCB4B4.png)\n\n## Introduction\nASetting is a Laravel package that allows you to manage settings dynamically in your Laravel applications. With this package, you can organize settings in groups stored in the database, supporting various types of settings for easy management.\n## Features\n-  Introducing an interactive blade page where users can view and modify application settings. With this feature, users will be able to customize the behavior and preferences of the application according to their needs.\n## Installation\n\nYou can add the ASetting package to your Laravel project by following the steps below.\n\n### Installation via Composer\n\nAdd the package to your project using Composer.\n\n```bash\ncomposer require aurorawebsoftware/asetting\n```\n\n### Publish Configuration\n\nTo publish the configuration file, run the following command:\n\n```bash\nphp artisan vendor:publish --tag=asetting-config\n```\n\nThis will add the `config/asetting.php` file to your project, which contains the configuration settings for the ASetting package.\n\n### Migration\n\nRun the migration to create the database table used to store settings:\n\n```bash\nphp artisan migrate\n```\n\n## Usage\n\n### ASetting Facade\n\nThe ASetting Facade allows you to easily manage settings. Below are some basic functions and features provided by the Facade.\n\n#### `group(string $group): self`\n\nUsed to work with settings in a specific group.\n\n```php\nASetting::group('site')-\u003egetValue('title');\n```\n\n#### `groups(array $groups): self`\n\nUsed to work with settings in multiple groups.\n\n```php\nASetting::groups(['site', 'mail'])-\u003eall();\n```\n\n#### `getValue(string $key): int|array|bool|string|null|SettingNotFoundException`\n\nUsed to get the value of a specific setting.\n\n```php\nASetting::group('site')-\u003egetValue('title');\n```\n\n#### `getTitle(string $key): string`\n\nUsed to get the title of a specific setting.\n\n```php\nASetting::group('site')-\u003egetTitle('title');\n```\n\n#### `isVisible(string $key): bool`\n\nUsed to check the visibility status of a specific setting.\n\n```php\nASetting::group('site')-\u003eisVisible('title');\n```\n\n#### `get(string $key): array`\n\nUsed to get all information about a specific setting.\n\n```php\nASetting::group('site')-\u003eget('title');\n```\n\n#### `getValues(array $keys): SettingNotFoundException|array`\n\nUsed to get the values of a specific setting.\n\n```php\nASetting::group('site')-\u003egetValues(['title','name']);\n```\n\n#### `getValues(array $keys): SettingNotFoundException|array`\n\nUsed to get the values of a specific settings.\n\n```php\nASetting::groups(['site','general'])-\u003egetValues(['title','name']);\n```\n\n#### `set(string $key, string|int|bool|array $value, string|null $title = null, bool|null $isVisible = null): bool|array`\n\nUsed to update or create the value of a specific setting.\n\n```php\nASetting::group('site')-\u003eset('title', 'New Title', 'Site Title', true);\n```\n\n#### `delete(string $key): bool|SettingNotFoundException`\n\nUsed to delete a specific setting.\n\n```php\nASetting::group('site')-\u003edelete('title');\n```\n\n#### `all(?string $group = null): array`\n\nUsed to get all settings grouped by groups or under a specific group.\n\n```php\nASetting::all(); // Get all settings\nASetting::group('site')-\u003eall(); // Get all settings under a specific group\n```\n\n#### `destroy(string $group): bool|SettingNotFoundException`\n\nUsed to delete all settings under a specific group.\n\n```php\nASetting::group('site')-\u003edestroy();\nASetting::groups(['site','general'])-\u003edestroy();\n```\n\n#### `add(string $group, string $key, string|int|bool|array $value, string $title = null, string $type = 'string', bool $isVisible = null): ASettingModel|SettingNotFoundException`\n\nUsed to add a new setting.\n\n```php\nASetting::add('site', 'new_setting', 'Value', 'Setting Title', 'string', true);\n```\n\n## API Usage\n### Config\nYou can define tokens for APIs. You can also configure it by adding your own middleware.\n```php\nreturn [\n'api_token' =\u003e ['YOUR_BEARER_TOKEN_HERE'],\n'api_middleware' =\u003e [\n// YourMiddlewareClass::class\n]\n];\n```\n### Endpoint Details\n\n\n### getValue\n\n- **Endpoint:** `/api/asetting/getValue/{group}/{key}`\n- **Method:** GET\n- **Parameters:** `group` (string), `key` (string)\n\n### getTitle\n\n- **Endpoint:** `/api/asetting/getTitle/{group}/{key}`\n- **Method:** GET\n- **Parameters:** `group` (string), `key` (string)\n\n### isVisible\n\n- **Endpoint:** `/api/asetting/isVisible/{group}/{key}`\n- **Method:** GET\n- **Parameters:** `group` (string), `key` (string)\n\n### get\n\n- **Endpoint:** `/api/asetting/get/{group}/{key}`\n- **Method:** GET\n- **Parameters:** `group` (string), `key` (string)\n\n### getValues\n\n- **Endpoint:** `/api/asetting/getValues`\n- **Method:** POST\n- **Parameters:** `group` (string|array), `keys` (array)\n\n### set\n\n- **Endpoint:** `/api/asetting/set`\n- **Method:** PUT\n- **Parameters:** `group` (string), `key` (string), `value` (string|array), `title` (string, optional), `is_visible` (bool, optional)\n\n### add\n\n- **Endpoint:** `/api/asetting/add`\n- **Method:** POST\n- **Parameters:** `group` (string), `key` (string), `value` (string|array|bool|int), `type` (string), `title` (string), `is_visible` (bool, optional)\n\n### all\n\n- **Endpoint:** `/api/asetting/all/{group?}`\n- **Method:** GET\n- **Parameters:** `group` (string, optional)\n\n### delete\n\n- **Endpoint:** `/api/asetting/delete/{group}/{key}`\n- **Method:** DELETE\n- **Parameters:** `group` (string), `key` (string)\n\n### destroy\n\n- **Endpoint:** `/api/asetting/destroy/{group}`\n- **Method:** DELETE\n- **Parameters:** `group` (string)\n\n### Error Handling\n\nIn case of invalid requests or errors, the API will return a JSON response with a corresponding message and, if applicable, validation errors.\n\nFeel free to copy and paste this documentation into your README file. Adjust the formatting as needed.\n\n\n## ASetting Command\n\nThis command allows you to interact with the ASetting package.\n\n### Usage\n\nphp artisan asetting {group=null} {key=null}\n\nThis command allows you to interact with the ASetting package.\n\n\n1. Fetch a specific setting value:\n\n```plaintext\nphp artisan asetting myGroup myKey\n```\n\n2. Fetch all settings in a specific group:\n\n```plaintext\nphp artisan asetting myGroup\n```\n\n3. Fetch all settings:\n\n```plaintext\nphp artisan asetting\n```\n\n### Note\n\n- If the specified group or key is not found, an exception message will be displayed.\n- The command returns the setting value, which can be a string, array, or other types, based on the configuration.\n\n\n## License\n\nThe ASetting package is licensed under the MIT License.\n\n--- \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faurorawebsoftware%2Fasetting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faurorawebsoftware%2Fasetting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faurorawebsoftware%2Fasetting/lists"}