• Stars
    star
    102
  • Rank 335,584 (Top 7 %)
  • Language
    PHP
  • License
    MIT License
  • Created almost 9 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🌳 Manage your .env file in Laravel projects through artisan

flex-env

Laravel FlexEnv

Latest Version on Packagist Total Downloads Software License Build Status Code Climate Code Quality StyleCI

This package adds a handful of useful commands to edit your .env file in Laravel directly from the command line with a simple, human readable API. Never touch the mouse again!

Installation

Via composer:

$ composer require sven/flex-env --dev

Alternatively, add the package to your dev dependencies in composer.json and run composer update afterwards:

{
    "require-dev": {
        "sven/flex-env": "^2.0"
    }
}

Note: If you're using Laravel 5.5, you're done! The service provider is automatically registered in the container, thanks to auto-discovery.

Next, add the FlexEnvServiceProvider to your providers array in config/app.php:

// config/app.php
'providers' => [
    ...
    Sven\FlexEnv\FlexEnvServiceProvider::class,
]

Usage

The commands in this package should now be registered. Simply run php artisan, and you will see them in the list.

# Create or edit an entry in your .env file:
$ php artisan env:set {key} {value} [--line-break|-L]
# Add the --line-break (or -L) option to insert a line break before the entry.
# Delete an entry from your .env file:
$ php artisan env:delete {key}
# Show the value of the given key from your .env file:
$ php artisan env:get {key}
# Show the entire .env file:
$ php artisan env:list

All changes you made should now be reflected in your .env file.

Inspiration

Inspiration for this package came from LeShadow's ArtisanExtended.

Contributing

All contributions (pull requests, issues and feature requests) are welcome. Make sure to read through the CONTRIBUTING.md first, though. See the contributors page for all contributors.

License

sven/flex-env is licensed under the MIT License (MIT). See the license file for more information.

More Repositories

1

artisan-view

👀 Manage your views in Laravel projects through artisan
PHP
871
star
2

env-providers

👷 Load Laravel service providers based on your application's environment.
PHP
77
star
3

forge-cli

🔥 A command line utility to interact with your Laravel Forge servers, sites, and more.
PHP
64
star
4

artisan-shortcuts

🍰 Register shortcuts to execute multiple artisan commands
PHP
57
star
5

file-config

📄 Store and read configuration values using files on disk.
PHP
27
star
6

super-basic-auth

🔒 A lightweight package to add basic authentication to your Laravel app.
PHP
23
star
7

laravel-testing-utils

🔬 Some useful assertions for in your Laravel application
PHP
21
star
8

helpers

😁 A collection of useful helper functions for in Laravel applications.
PHP
20
star
9

laravel-ide

💻 Generate IDE helper files for your Laravel applications with a single command.
PHP
7
star
10

dns-template

Manage your DNS from GitHub with DNSControl
JavaScript
6
star
11

commonmark-image-media-queries

Use media queries for images in your CommonMark-rendered Markdown.
PHP
6
star
12

package-skeleton

📦 My base for PHP packages.
PHP
6
star
13

laravel-view-assertions

🧑‍🔬 The missing assertions for your views in your Laravel applications.
PHP
6
star
14

emote-cli

Emotes from the command line ⊂(◉‿◉)つ
PHP
4
star
15

meeseeks

📺 🙊 I'm mister Meeseeks, look at meeeeeeeeeeeeeeeeeeeeee
HTML
3
star
16

minecraft-php

📦 🎮 A wrapper around Mojang's Minecraft API.
PHP
2
star
17

svenluijten.com-old

🙋‍♂️ The source for my personal website & blog
PHP
2
star
18

setup-php-issue

1
star
19

kennissessie-laravel

Kennissessie Laravel, gegeven bij E-sites
PHP
1
star
20

dotfiles

💻 My macOS dotfiles
Shell
1
star
21

awesome-password-managers

🔒 A curated list of awesome password managers
1
star
22

asdf-kluctl

kluctl plugin for asdf
Shell
1
star
23

laravel-collection-testing-helpers

🧑‍🏫 Convenience methods on your Laravel collections to make testing them more fluent.
PHP
1
star
24

heap

📦 🗻 Easier handling for arrays in PHP.
PHP
1
star