Download the PHP package syamsoul/laravel-set-env without Composer
On this page you can find all versions of the php package syamsoul/laravel-set-env. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-set-env
Laravel Environment Variable Setter
A Laravel package that enables programmatic modification of environment variables in your .env
file. Simple, secure, and efficient way to manage your Laravel application's environment configuration.
✨ Features
- 🔐 Secure environment variable management
- 🚀 Simple and intuitive API
- 💻 Command-line interface support
- 📝 Support for comments in .env files
- 🎯 Precise variable positioning
- 🔄 Multiple file support (.env, .env.example, etc.)
- ⚡ Production-ready with safety checks
📋 Table of Contents
- Requirements
- Installation
- Usage
- Basic Setup
- Setting Environment Variables
- Getting Environment Variables
- Using Artisan Commands
- Production Usage
- Support
- License
🔧 Requirements
- Laravel 10.x or higher
- PHP 8.0 or higher
📦 Installation
You can install the package via Composer:
🚀 Usage
Basic Setup
First, import the Env
facade in your code:
Setting Environment Variables
There are multiple ways to set or update environment variables:
Using PHP Code
-
Basic usage:
-
Add comments:
- Control variable positioning:
Using Artisan Commands
-
Interactive mode:
-
Direct mode:
- Specify target env file:
Getting Environment Variables
Retrieve environment variable values using the get
method:
🛡️ Production Usage
When working in a production environment, you can use the --force
flag to bypass confirmation prompts:
❤️ Support
If you find this package helpful, consider supporting the development:
BNB (BSC) Donation Address:

📄 License
This package is open-sourced software licensed under the MIT License.
All versions of laravel-set-env with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/console Version ^10.0|^11.0|^12.0