{"id":20513425,"url":"https://github.com/slimani-dev/laravel-env-write","last_synced_at":"2026-01-29T23:32:17.049Z","repository":{"id":225076997,"uuid":"764971666","full_name":"slimani-dev/laravel-env-write","owner":"slimani-dev","description":"A package to write to the .env file.","archived":false,"fork":false,"pushed_at":"2024-07-08T05:19:39.000Z","size":28,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T13:52:56.839Z","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/slimani-dev.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},"funding":{"github":"Mohamed slimani"}},"created_at":"2024-02-29T03:23:08.000Z","updated_at":"2024-02-29T05:58:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"32f869bc-8180-4bcd-893f-d28847ca0787","html_url":"https://github.com/slimani-dev/laravel-env-write","commit_stats":null,"previous_names":["moh-slimani/laravel-env-write","slimani-dev/laravel-env-write"],"tags_count":1,"template":false,"template_full_name":"spatie/package-skeleton-laravel","purl":"pkg:github/slimani-dev/laravel-env-write","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slimani-dev%2Flaravel-env-write","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slimani-dev%2Flaravel-env-write/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slimani-dev%2Flaravel-env-write/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slimani-dev%2Flaravel-env-write/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slimani-dev","download_url":"https://codeload.github.com/slimani-dev/laravel-env-write/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slimani-dev%2Flaravel-env-write/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28890349,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T21:06:44.224Z","status":"ssl_error","status_checked_at":"2026-01-29T21:06:42.160Z","response_time":59,"last_error":"SSL_read: 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":[],"created_at":"2024-11-15T21:11:02.111Z","updated_at":"2026-01-29T23:32:17.033Z","avatar_url":"https://github.com/slimani-dev.png","language":"PHP","funding_links":["https://github.com/sponsors/Mohamed slimani"],"categories":[],"sub_categories":[],"readme":"# A package to write to the .env file.\n\n[![Latest Version on Packagist](https://img.shields.io/packagist/v/moh-slimani/laravel-env-write.svg?style=flat-square)](https://packagist.org/packages/moh-slimani/laravel-env-write)\n[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/moh-slimani/laravel-env-write/run-tests.yml?branch=main\u0026label=tests\u0026style=flat-square)](https://github.com/moh-slimani/laravel-env-write/actions?query=workflow%3Arun-tests+branch%3Amain)\n[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/moh-slimani/laravel-env-write/fix-php-code-style-issues.yml?branch=main\u0026label=code%20style\u0026style=flat-square)](https://github.com/moh-slimani/laravel-env-write/actions?query=workflow%3A\"Fix+PHP+code+style+issues\"+branch%3Amain)\n[![Total Downloads](https://img.shields.io/packagist/dt/moh-slimani/laravel-env-write.svg?style=flat-square)](https://packagist.org/packages/moh-slimani/laravel-env-write)\n\nLaravelEnvWrite is a Laravel package designed to simplify the process of updating the .env file in Laravel applications.\nIt provides a convenient way to automatically update the environment file during database seeding or from anywhere in\nthe codebase.\n\n## Support us\n\n[\u003cimg src=\"https://github-ads.s3.eu-central-1.amazonaws.com/laravel-env-write.jpg?t=1\" width=\"419px\" /\u003e](https://spatie.be/github-ad-click/laravel-env-write)\n\nWe invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can\nsupport us by [buying one of our paid products](https://spatie.be/open-source/support-us).\n\nWe highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using.\nYou'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards\non [our virtual postcard wall](https://spatie.be/open-source/postcards).\n\n## Installation\n\nYou can install the package via composer:\n\n```bash\ncomposer require moh-slimani/laravel-env-write\n```\n\n## Configuration\n\nThe package doesn't require any additional configuration. Once installed, you can start using it immediately.\n\n## Usage\n\n### Command Line Interface\n\nThe package provides an Artisan command to update the .env file from the command line.\n\n```bash\nphp artisan env:write {key} {value?}\n```\n\n- {key}: The key to update in the .env file. It can be provided either as a single argument or in the format key=value.\n- {value}: The value to set for the key. This argument is optional and only required when providing a single argument\n  for the key.\n\n#### Examples\n\n```bash\nphp artisan env:write APP_ENV production\n```\n\n```bash\nphp artisan env:write APP_KEY=your_app_key\n```\n\n### Programmatically\nYou can also use the package programmatically in your codebase:\n\n\n\n```php\nuse MohSlimani\\LaravelEnvWrite\\Facades\\LaravelEnvWrite;\n\n// Update the environment file with a specific key and value\nLaravelEnvWrite::updateEnvironmentFileWith('APP_ENV', 'production');\n```\n\n## Testing\n\n```bash\ncomposer test\n```\n\n## Changelog\n\nPlease see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.\n\n## Contributing\n\nPlease see [CONTRIBUTING](CONTRIBUTING.md) for details.\n\n## Security Vulnerabilities\n\nPlease review [our security policy](../../security/policy) on how to report security vulnerabilities.\n\n## Credits\n\n- [Mohamed slimani](https://github.com/moh-slimani)\n- [All Contributors](../../contributors)\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%2Fslimani-dev%2Flaravel-env-write","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslimani-dev%2Flaravel-env-write","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslimani-dev%2Flaravel-env-write/lists"}