PHP code example of jobmetric / laravel-env-modifier

1. Go to this page and download the library: Download jobmetric/laravel-env-modifier library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

jobmetric / laravel-env-modifier example snippets


JobMetric\EnvModifier\Facades\EnvModifier::setPath('complete path file')

JobMetric\EnvModifier\Facades\EnvModifier::set([
    'KEY1' => 123,
    'KEY2' => 456,
    ...
])

JobMetric\EnvModifier\Facades\EnvModifier::get('KEY1')

JobMetric\EnvModifier\Facades\EnvModifier::get('KEY1', 'KEY2', ...)

JobMetric\EnvModifier\Facades\EnvModifier::get(['KEY1', 'KEY2', ...])

JobMetric\EnvModifier\Facades\EnvModifier::get(['KEY1', 'KEY2', ...], 'KEY3', 'KEY4', ...)

array(
    'KEY1' => 123,
    'KEY2' => 456,
    ...
)

JobMetric\EnvModifier\Facades\EnvModifier::delete('KEY1')

JobMetric\EnvModifier\Facades\EnvModifier::delete('KEY1', 'KEY2', ...)

JobMetric\EnvModifier\Facades\EnvModifier::delete(['KEY1', 'KEY2', ...])

JobMetric\EnvModifier\Facades\EnvModifier::delete(['KEY1', 'KEY2', ...], 'KEY3', 'KEY4', ...)

JobMetric\EnvModifier\Facades\EnvModifier::has('KEY1')