PHPackages                             djunehor/php-env-export - 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. djunehor/php-env-export

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

djunehor/php-env-export
=======================

Laravel PHP package to export env keys

1.0.0(6y ago)135MITPHPPHP &gt;=5.0

Since Dec 16Pushed 6y ago1 watchersCompare

[ Source](https://github.com/djunehor/php-env-export)[ Packagist](https://packagist.org/packages/djunehor/php-env-export)[ RSS](/packages/djunehor-php-env-export/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

PHP Env Export
==============

[](#php-env-export)

[![CircleCI](https://camo.githubusercontent.com/e6135ab07f65f459d498e1b5d1bfbd9dc9d1a89aa110751b107211a8ae2f82fc/68747470733a2f2f636972636c6563692e636f6d2f67682f646a756e65686f722f7068702d656e762d6578706f72742e7376673f7374796c653d737667)](https://circleci.com/gh/djunehor/php-env-export)[![Latest Stable Version](https://camo.githubusercontent.com/f729b6df72a34a41c7e16436a61a39287c476e59fae04bc376b75f16aca1aed0/68747470733a2f2f706f7365722e707567782e6f72672f646a756e65686f722f7068702d656e762d6578706f72742f762f737461626c65)](https://packagist.org/packages/djunehor/php-env-export)[![Total Downloads](https://camo.githubusercontent.com/c160447ba86e1275ebc6a2bfaad737ad36a3ee152254ed5ccd92feed05894cf7/68747470733a2f2f706f7365722e707567782e6f72672f646a756e65686f722f7068702d656e762d6578706f72742f646f776e6c6f616473)](https://packagist.org/packages/djunehor/eyowo-php)[![License](https://camo.githubusercontent.com/66465c0ed1c1f4e9901cb6aa26ce406b66c6869d99e0013f8429c9ccbf1c49f8/68747470733a2f2f706f7365722e707567782e6f72672f646a756e65686f722f7068702d656e762d6578706f72742f6c6963656e7365)](https://packagist.org/packages/djunehor/php-env-export)[![Build Status](https://camo.githubusercontent.com/8f7a725bdd22c71be6f7e6a8a9e52473a0cf7696866f6509f9b4707eead263be/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f646a756e65686f722f7068702d656e762d6578706f72742f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/djunehor/php-env-export/build-status/master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/754d45ca8fde105c7d284e95e5d75904962a6bfbafcda2cae5cbfffebe2725f2/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f646a756e65686f722f7068702d656e762d6578706f72742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/djunehor/php-env-export/?branch=master)

PHP Package to export env keys to new file

- [Laravel Bible](#php-env-export)
    - [Installation](#installation)
        - [Laravel 5.5 and above](#laravel-55-and-above)
        - [Laravel 5.4 and older](#laravel-54-and-older)
        - [Lumen](#lumen)
    - [Usage](#usage)
    - [Contributing](#contributing)

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

[](#installation)

You can install the package via composer:

```
composer require --dev djunehor/php-env-export
```

#### Laravel 5.5 and above

[](#laravel-55-and-above)

The package will automatically register itself, so you can start using it immediately.

#### Laravel 5.4 and older

[](#laravel-54-and-older)

In Laravel version 5.4 and older, you have to add the service provider in `config/app.php` file manually:

```
'providers' => [
    // ...
    Djunehor\Env\EnvExportServiceProvider::class,
];
```

#### Lumen

[](#lumen)

After installing the package, you will have to register it in `bootstrap/app.php` file manually:

```
// Register Service Providers
    // ...
    $app->register(Djunehor\Env\EnvExportServiceProvider::class);
];
```

Usage
-----

[](#usage)

### via helper method

[](#via-helper-method)

```
$from = '.env'; //default value is .env
$to = '.env.example'; // default value is .env.example
export_env($from, $to);
```

### Via Laravel Artisan Command

[](#via-laravel-artisan-command)

- `php artisan env:export` uses default values
- Or `php artisan env:export --from=.env --to='.env.example`
- Or `php artisan env:export -f=.env -to='.env.example`

### Via Console/Terminal

[](#via-consoleterminal)

- At the root of your application, run `php --run "require 'vendor/djunehor/php-env-export/src/Export.php'; export_env();"`

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

[](#contributing)

- Fork this project
- Clone to your repo
- Make your changes and run tests `composer test`
- Push and create a pull request

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

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

Unknown

Total

1

Last Release

2343d ago

### Community

Maintainers

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

---

Top Contributors

[![djunehor](https://avatars.githubusercontent.com/u/20708833?v=4)](https://github.com/djunehor "djunehor (3 commits)")

---

Tags

phplaravelexportlaravel-packageenvdjunehor

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/djunehor-php-env-export/health.svg)

```
[![Health](https://phpackages.com/badges/djunehor-php-env-export/health.svg)](https://phpackages.com/packages/djunehor-php-env-export)
```

###  Alternatives

[imanghafoori/laravel-nullable

A package to help you write expressive defensive code in a functional manner

151423.7k6](/packages/imanghafoori-laravel-nullable)[imanghafoori/laravel-middlewarize

Use laravel middlewares on any method calls in your app

1134.5k1](/packages/imanghafoori-laravel-middlewarize)[djunehor/laravel-bible

Laravel package to fetch from the Holy Bible

182.8k](/packages/djunehor-laravel-bible)[allysonsilva/laravel-multienv

This package allows you to use multiple .envs in multitenant environment

537.2k](/packages/allysonsilva-laravel-multienv)[waad/laravel-profanity-filter

Laravel Profanity Filter - Powerful PHP package for detecting, filtering, and masking profanity in multiple languages. Supports leet speak, custom word lists, case sensitivity, and seamless Laravel integration.

202.9k](/packages/waad-laravel-profanity-filter)[djunehor/laravel-sms

Send SMS from your laravel application

385.3k1](/packages/djunehor-laravel-sms)

PHPackages © 2026

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