PHP code example of jncinet / laravel-env-editor
1. Go to this page and download the library: Download jncinet/laravel-env-editor 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/ */
jncinet / laravel-env-editor example snippets
// 读取.env键值
app('env-editor')->getEnv($key = null)
// 更新保存.env文件
app('env-editor')->setEnv(['key' => 'value']);