{"id":19638098,"url":"https://github.com/simon28082/file-config","last_synced_at":"2025-04-28T10:30:28.030Z","repository":{"id":56958844,"uuid":"87674869","full_name":"simon28082/file-config","owner":"simon28082","description":"file read and put config","archived":false,"fork":false,"pushed_at":"2018-04-26T05:30:47.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-05T08:05:18.082Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/simon28082.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-09T01:30:41.000Z","updated_at":"2018-05-02T08:34:02.000Z","dependencies_parsed_at":"2022-08-21T05:10:11.223Z","dependency_job_id":null,"html_url":"https://github.com/simon28082/file-config","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon28082%2Ffile-config","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon28082%2Ffile-config/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon28082%2Ffile-config/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/simon28082%2Ffile-config/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/simon28082","download_url":"https://codeload.github.com/simon28082/file-config/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251295069,"owners_count":21566390,"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":[],"created_at":"2024-11-11T12:37:35.756Z","updated_at":"2025-04-28T10:30:27.560Z","avatar_url":"https://github.com/simon28082.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# file-config\nSets the storage format of the configuration file\n\n## Example\n\nupdate file_config.php\n\n```\n'files'=\u003e[\n    /tmp/crcms,\n    // Set up other parsing drivers\n    /tmp/crcms =\u003e \\CrCms\\FileConfig\\Drives\\SerializeConfig::class,\n    \n],\n\n'default_drive'=\u003e\\CrCms\\FileConfig\\Drives\\DefaultConfig::class,\n```\n\nput\n\n```\nfile_config([\n    crcms.a=\u003e'a',\n    crcms.b=\u003e'b'\n])\n\n//or\n\nfile_config()-\u003eput('crcms.a',['k'=\u003e'k','s'=\u003e's'])\n```\n\nget\n\n```\nfile_config('crcms.a')\n```\n\nall\n\n```\nfile_config('crcms')\n```\n\ndestroy\n\n```\nfile_config()-\u003edestroy('crcms.a')\n```\n\n0.0.2 above the new load method\n\n```\nExample test.php\nkey1=\u003evalue1\nkey2=\u003evalue2\n\n//get all\nfile_config()-\u003eload('/path/test.conf')-\u003eall('test')\n```\n\n0.0.3 Add multiple dot depth support\n\nfile_config()-\u003eload('/path/test.conf')-\u003eget('test.depth1.depth2.0')\n\n0.0.4 Overwrite all configurations\n\n```\nfile_config(['crcms'=\u003e[1,2,3]])\n\n//or\n\nfile_config()-\u003eput('crcms',['key'=\u003e[1,'value']])\n```\n\n\n## Install\n\nYou can install the package via composer:\n\n```\ncomposer require crcms/file-config\n```\n\n## Laravel\n\nModify ``config / app.php``\n\n```\n'providers' =\u003e [\n    CrCms\\FileConfig\\FileConfigServiceProvider::class,\n]\n\n\n'aliases' =\u003e [\n    'FileConfig' =\u003e \\CrCms\\FileConfig\\Facades\\FileConfig::class\n],\n```\n\nIf you'd like to make configuration changes in the configuration file you can pubish it with the following Aritsan command:\n```\nphp artisan vendor:publish --provider=\"CrCms\\FileConfig\\FileConfigServiceProvider\"\n```\n\n## Laravel Testing\n\n```\nphpunit ./tests/Config\n```\n\n## License\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon28082%2Ffile-config","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsimon28082%2Ffile-config","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsimon28082%2Ffile-config/lists"}