PHPackages                             laravel-ready/env-profile-manager - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. laravel-ready/env-profile-manager

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

laravel-ready/env-profile-manager
=================================

Environment profile manager for Laravel applications

v1.0.1(10mo ago)2208[2 PRs](https://github.com/laravel-ready/env-profile-manager/pulls)MITPHPPHP ^8.2CI passing

Since Jul 11Pushed 5mo agoCompare

[ Source](https://github.com/laravel-ready/env-profile-manager)[ Packagist](https://packagist.org/packages/laravel-ready/env-profile-manager)[ RSS](/packages/laravel-ready-env-profile-manager/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (9)Versions (5)Used By (0)

Laravel Environment Profile Manager
===================================

[](#laravel-environment-profile-manager)

[![Tests](https://github.com/laravel-ready/env-profile-manager/actions/workflows/tests.yml/badge.svg)](https://github.com/laravel-ready/env-profile-manager/actions/workflows/tests.yml)[![Latest Stable Version](https://camo.githubusercontent.com/899915255b459d8d6846d738168633018c1a3e9bd7934f6aa9add1757633891d/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d72656164792f656e762d70726f66696c652d6d616e616765722f76)](https://packagist.org/packages/laravel-ready/env-profile-manager)[![Total Downloads](https://camo.githubusercontent.com/d8f9c051a6fe64653b2500bd5ec05197c01e122a51fd092a31b7dcd8442adfcb/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d72656164792f656e762d70726f66696c652d6d616e616765722f646f776e6c6f616473)](https://packagist.org/packages/laravel-ready/env-profile-manager)[![License](https://camo.githubusercontent.com/fbdcae5439df6487c7738304dcbd48098228eeb1245bfebe47a137f40be083e9/68747470733a2f2f706f7365722e707567782e6f72672f6c61726176656c2d72656164792f656e762d70726f66696c652d6d616e616765722f6c6963656e7365)](https://packagist.org/packages/laravel-ready/env-profile-manager)

A Laravel package for managing multiple environment configurations (.env files) with an intuitive web interface. Easily switch between different environment profiles, create backups, and manage your application's configuration.

Features
--------

[](#features)

- 🔄 **Multiple Environment Profiles**: Create and manage multiple .env configurations
- 🎨 **Modern Web Interface**: Vue 3 + Tailwind CSS interface with Monaco Editor
- 🌓 **Dark/Light Mode**: Built-in theme support with system preference detection
- 💾 **Automatic Backups**: Automatically backup .env files before changes
- 🏷️ **Application Names**: Optionally tag profiles with application names
- 🔒 **Secure**: Configurable middleware protection
- 📦 **Easy Installation**: Simple composer installation with publish commands
- 🚀 **Laravel 10/11/12 Support**: Compatible with latest Laravel versions
- 🔌 **API Support**: RESTful API endpoints for programmatic access

Preview
-------

[](#preview)

[![Preview](./preview.png)](./preview.png)

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Laravel 10.0 or higher

Installation
------------

[](#installation)

1. Install the package via Composer:

```
composer require laravel-ready/env-profile-manager
```

2. Publish the package resources:

```
php artisan env-profile-manager:publish
```

Or publish specific resources:

```
# Publish config file
php artisan vendor:publish --tag=env-profile-manager-config

# Publish views (if you want to customize)
php artisan vendor:publish --tag=env-profile-manager-views

# Publish assets
php artisan vendor:publish --tag=env-profile-manager-assets

# Publish migrations
php artisan vendor:publish --tag=env-profile-manager-migrations
```

3. Run the migrations:

```
php artisan migrate
```

4. (Optional) Add CSRF token meta tag to your layout if not already present:

```

```

Configuration
-------------

[](#configuration)

The configuration file is published to `config/env-profile-manager.php`. Here are the available options:

```
return [
    // Web route prefix
    'route_prefix' => 'env-profile-manager',

    // API route prefix
    'api_prefix' => 'api/env-profile-manager',

    // Middleware for web routes
    'middleware' => ['web', 'auth'],

    // Middleware for API routes
    'api_middleware' => ['api', 'auth:sanctum'],

    // Layout to extend for views
    // Set to null to use the package's default layout
    // Example: 'layouts.app' to use your application's layout
    'layout' => 'env-profile-manager::layouts.default',

    // Maximum number of .env backups to keep
    'max_backups' => 10,

    // Enable/disable features
    'features' => [
        'api' => true,
        'web_ui' => true,
        'backups' => true,
    ],
];
```

Usage
-----

[](#usage)

### Web Interface

[](#web-interface)

After installation, navigate to `/env-profile-manager` (or your configured route prefix) to access the web interface.

Features available in the web interface:

- View and edit current .env configuration
- Create new profiles from current configuration
- Load saved profiles
- Activate profiles (overwrites current .env)
- Delete profiles
- Real-time syntax highlighting with Monaco Editor

### API Endpoints

[](#api-endpoints)

If API is enabled in configuration, the following endpoints are available:

- `GET /api/env-profile-manager` - List all profiles and current .env content
- `POST /api/env-profile-manager` - Create a new profile
- `GET /api/env-profile-manager/{id}` - Get a specific profile
- `PUT /api/env-profile-manager/{id}` - Update a profile
- `DELETE /api/env-profile-manager/{id}` - Delete a profile
- `POST /api/env-profile-manager/{id}/activate` - Activate a profile
- `GET /api/env-profile-manager/current-env` - Get current .env content
- `PUT /api/env-profile-manager/current-env` - Update current .env content

### Programmatic Usage

[](#programmatic-usage)

You can also use the package programmatically:

```
use LaravelReady\EnvProfiles\Models\EnvProfile;
use LaravelReady\EnvProfiles\Services\EnvFileService;

// Create a new profile
$profile = EnvProfile::create([
    'name' => 'Production',
    'app_name' => 'My Laravel App',
    'content' => file_get_contents(base_path('.env.production')),
]);

// Activate a profile
$profile->activate();

// Use the EnvFileService
$envService = app(EnvFileService::class);
$currentEnv = $envService->read();
$envService->write($newContent);
```

Security Considerations
-----------------------

[](#security-considerations)

1. **Protect Routes**: The package uses middleware configuration to protect routes. Make sure to configure appropriate middleware.
2. **Sensitive Data**: Be careful when storing sensitive data in profiles. Consider encrypting sensitive values.
3. **Backups**: The package automatically creates backups before modifying .env files. Configure `max_backups` to control disk usage.

Customization
-------------

[](#customization)

### Views

[](#views)

To customize the views, publish them and edit as needed:

```
php artisan vendor:publish --tag=env-profile-manager-views
```

Views will be published to `resources/views/vendor/env-profile-manager/`.

### Extending the Layout

[](#extending-the-layout)

By default, the package uses its own layout (`env-profile-manager::layouts.default`). You can use your application's layout by changing the configuration:

```
'layout' => 'layouts.app',
```

Or set it to `null` to use the package's default layout:

```
'layout' => null,
```

If using a custom layout, make sure it has a `@yield('content')` section and includes the necessary `@stack('styles')` and `@stack('scripts')` directives.

Troubleshooting
---------------

[](#troubleshooting)

### Monaco Editor Not Loading

[](#monaco-editor-not-loading)

Make sure your layout includes the style and script stacks:

```
@stack('styles')
@stack('scripts')
```

### CSRF Token Errors

[](#csrf-token-errors)

Ensure your layout includes the CSRF token meta tag:

```

```

### Permission Denied Errors

[](#permission-denied-errors)

Check that the web server has write permissions for:

- The `.env` file
- The Laravel base directory (for creating backups)

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit a Pull Request.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance64

Regular maintenance activity

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

304d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8c5a4a2047094867ebe437462b827160e660b5e7bfbad68b57f8d255890d42a?d=identicon)[relliv](/maintainers/relliv)

---

Top Contributors

[![relliv](https://avatars.githubusercontent.com/u/17010054?v=4)](https://github.com/relliv "relliv (32 commits)")

---

Tags

envenv-editorenv-guienv-managerenv-profileslaravellaravelconfigurationenvironmentenvprofiles

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/laravel-ready-env-profile-manager/health.svg)

```
[![Health](https://phpackages.com/badges/laravel-ready-env-profile-manager/health.svg)](https://phpackages.com/packages/laravel-ready-env-profile-manager)
```

###  Alternatives

[yajra/laravel-datatables-oracle

jQuery DataTables API for Laravel

4.9k33.8M339](/packages/yajra-laravel-datatables-oracle)[spatie/laravel-enum

Laravel Enum support

3655.4M31](/packages/spatie-laravel-enum)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[datomatic/nova-enum-field

A Laravel Nova PHP 8.1 enum field with filters

20134.2k](/packages/datomatic-nova-enum-field)[msztorc/laravel-env

Laravel env helper commands

7855.4k](/packages/msztorc-laravel-env)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
