Code Monkey home page Code Monkey logo

laravel-dotenv-editor's Introduction

Codacy Badge Latest Stable Version Total Downloads Latest Unstable Version License

Edit your Laravel .env file

This package offers you the possibility to edit your .env dynamically through a controller or model.

The current version (2.x) ships with a graphical user interface based on VueJS to offer you a very simple implementation of all features.

List of available functions:

  • check, if a given key exists
  • get the value of a key
  • get the complete content of your .env
  • get the content as JSON
  • change existing values
  • add new key-value-pairs
  • delete existing key-value-pairs
  • create/restore/delete backups
  • list all backups
  • get the content of a backup
  • enable auto-backups
  • check, if auto-backups are enabled or not
  • get and set a backup-path

Here are some images showing the gui which ships with the current version:

Overview Overview with loaded content Edit an entry Adding a new key-value-pair Backups Showing the content of a backup More options for backups Uploading Backups

Installation

Visit the Wiki-page to get more Information.

Examples

The following example shows an controller with a method, in which we change some values from the .env. Make sure, the entries you want to change, really exist in your .env.

namespace App\Http\Controllers;

use Brotzka\DotenvEditor\DotenvEditor;

class EnvController extends Controller
{
    public function test(){
        $env = new DotenvEditor();

        $env->changeEnv([
            'TEST_ENTRY1'   => 'one_new_value',
            'TEST_ENTRY2'   => $anotherValue,
        ]);
    }
}

For more exmaples visit the Wiki.

laravel-dotenv-editor's People

Contributors

brotzka avatar nguyentranchung avatar hepplerdotnet avatar elegasoft avatar mckaragulle avatar jozefbalun avatar vegatom avatar antonkomarev avatar awjudd avatar corvisier avatar martin-sanjuan avatar r4v avatar codacy-badger avatar tjoosten avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.