{"id":28277595,"url":"https://github.com/0xm4ze/dotenv","last_synced_at":"2025-06-23T20:03:44.560Z","repository":{"id":57674461,"uuid":"483242883","full_name":"0xm4ze/dotenv","owner":"0xm4ze","description":" A PHP Package for editing dotenv files ","archived":false,"fork":false,"pushed_at":"2022-04-19T12:55:38.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-29T16:35:15.678Z","etag":null,"topics":["dotenv","dotenv-editor"],"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/0xm4ze.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-04-19T12:45:27.000Z","updated_at":"2022-04-19T12:53:27.000Z","dependencies_parsed_at":"2022-08-29T14:30:17.665Z","dependency_job_id":null,"html_url":"https://github.com/0xm4ze/dotenv","commit_stats":null,"previous_names":["0xm4ze/dotenv","tal7aouy/dotenv"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/0xm4ze/dotenv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xm4ze%2Fdotenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xm4ze%2Fdotenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xm4ze%2Fdotenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xm4ze%2Fdotenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xm4ze","download_url":"https://codeload.github.com/0xm4ze/dotenv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xm4ze%2Fdotenv/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260561567,"owners_count":23028235,"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":["dotenv","dotenv-editor"],"created_at":"2025-05-21T06:30:48.358Z","updated_at":"2025-06-23T20:03:44.550Z","avatar_url":"https://github.com/0xm4ze.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dotenv editing\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/tal7aouy/dotenv.svg?style=flat-square)](https://packagist.org/packages/tal7aouy/dotenv)\n[![Total Downloads](https://img.shields.io/packagist/dt/tal7aouy/dotenv.svg?style=flat-square)](https://packagist.org/packages/tal7aouy/dotenv)\n![run-tests](https://github.com/tal7aouy/dotenv/workflows/run-tests/badge.svg)\n\nThis package provides some basic tools for editing dotenv files.\n\n## Installation\nYou can install the package via composer:\n\n```bash\ncomposer require tal7aouy/dotenv\n```\n\n## Usage\n\n### Add a section\nGiven we have an existing file at `base_path('.env')`.\nWe can add a new section to the existing configuration file.\n``` php\n$dotenv = new Dotenv();\n\n$dotenv-\u003eload(base_path('.env'));\n$dotenv-\u003eheading('DB_CONNECTION');\n$dotenv-\u003eset('DB_CONNECTION', 'mysql');\n$dotenv-\u003eset('DB_HOST', '127.0.0.1');\n$dotenv-\u003eset('DB_PORT', '3306');\n$dotenv-\u003eset('DB_DATABASE', 'demo');\n$dotenv-\u003eset('DB_USERNAME', 'root');\n$dotenv-\u003eset('DB_PASSWORD', '');\n$dotenv-\u003egetEnv('DB_DATABASE'); // demo\n$dotenv-\u003esave();\n```\n\nThis will result in the following changes.\n```\nAPP_KEY=supersecret\n\n# DB_CONNECTION\nDB_CONNECTION=mysql\nDB_HOST=127.0.0.1\nDB_PORT=3306\nDB_DATABASE=demo\nDB_USERNAME=root\nDB_PASSWORD=\n```\n\n## Testing\n```bash\n\u003e composer test\n```\n\n## Code Style\nStyleCI will apply the [Laravel preset](https://docs.styleci.io/presets#laravel).\n\n## Changelog\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security\nIf you discover any security related issues, please email oss@tjmiller.co instead of using the issue tracker.\n\n\n## Credits\n- [Mhammed Talhaouy](https://github.com/tal7aouy)\n\n## License\nPlease see [License File](LICENSE.md) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xm4ze%2Fdotenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xm4ze%2Fdotenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xm4ze%2Fdotenv/lists"}