承接 farshadth/laravel-dotenv 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

farshadth/laravel-dotenv

最新稳定版本:1.1

Composer 安装命令:

composer require farshadth/laravel-dotenv

包简介

This is a package to edit .env file

README 文档

README

Laravel DotEnv is a simple package for editing .env files in Laravel projects. This package allows you to read, edit, or delete values in the .env file. Additionally, you can copy or move the .env file.

Installation

You can install this package via composer:

composer require farshadth/laravel-dotenv

Available Methods

  • get()
  • getList()
  • set()
  • setList()
  • delete()
  • deleteList()
  • exists()
  • getFileContent()
  • getOrSet()
  • getAndDelete()
  • copyFile()
  • moveFile()
  • setFilePath()
  • getFilePath()
  • deleteFile()
  • createFile()

Examples

use Farshadth\DotEnv\Facades\DotEnv;

DotEnv::get($key);

// get multiple keys
DotEnv::getList(['key1', 'key2'])

DotEnv::set($key, $value);

// set multiple keys and values
DotEnv::setList([
    'key1' => 'value1', 
    'key2' => 'value2'
]);

DotEnv::delete($key);

DotEnv::deleteList(['key1', 'key2'])

DotEnv::exists($key);
 
 // get the content of the .env file
DotEnv::getFileContent(); 

// get the key and if not exists
// set the key and value
DotEnv::getOrSet($key, $value); 

// get the key and delete it
DotEnv::getAndDelete($key); 

// copy the .env file to the new path
DotEnv::copyFile($to, $from);

// move the .env file to the new path
DotEnv::moveFile($to, $from);

// set another .env file path to edit that file
// instead of the default .env file
DotEnv::setFilePath($path);

// get the default .env file path,
// if another .env file is set it returns that path
DotEnv::getFilePath();

// delete the .env file
DotEnv::deleteFile($path = null);

// create an empty .env file
DotEnv::createFile($path);

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固