Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Set Env Laravel Package

syamsoul/laravel-set-env

Programmatically set, update, and read Laravel .env variables with a simple facade and CLI. Supports comments, precise placement, and multiple env files (.env, .env.example). Includes production safety checks for secure environment configuration management.

View on GitHub
Deep Wiki
Context7
1.4.0

Laravel 13 Compatibility

1.3.0
  • Added facade
  • Added $comments parameter in set method (to add comment/remarks)
  • Added $afterKey parameter in set method (to add/update key after a specific key)
  • Added envFile method (to change env file when using facade)
1.2.0

Changes:

  • Improved get method by using fluent strings rather than constantly making new object as suggested by @skeemer in issue #7
  • Improved set method by accepting boolean (true or false)
  • Improved set method by removing quotes (only insert quotes if needed, e.g have whitespaces or special characters)
1.1.1
  • trim value when using get method
1.1.0
  • Allow run artisan command in production without prompt (by using --force option)

example:

php artisan souldoit:set-env APP_KEY=12334566 --force
1.0.9
1.0.8
1.0.7
  • Fix - path not found
1.0.6
  • Amended readme
1.0.5

First release

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
socialdept/atp-orm
cboxdk/laravel-assistant-client
socialdept/atp-resolver
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin