定制 moh-slimani/laravel-env-write 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

moh-slimani/laravel-env-write

最新稳定版本:0.0.1

Composer 安装命令:

composer require moh-slimani/laravel-env-write

包简介

A package to write to the .env file.

README 文档

README

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

LaravelEnvWrite is a Laravel package designed to simplify the process of updating the .env file in Laravel applications. It provides a convenient way to automatically update the environment file during database seeding or from anywhere in the codebase.

Support us

We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.

Installation

You can install the package via composer:

composer require moh-slimani/laravel-env-write

Configuration

The package doesn't require any additional configuration. Once installed, you can start using it immediately.

Usage

Command Line Interface

The package provides an Artisan command to update the .env file from the command line.

php artisan env:write {key} {value?}
  • {key}: The key to update in the .env file. It can be provided either as a single argument or in the format key=value.
  • {value}: The value to set for the key. This argument is optional and only required when providing a single argument for the key.

Examples

php artisan env:write APP_ENV production
php artisan env:write APP_KEY=your_app_key

Programmatically

You can also use the package programmatically in your codebase:

use MohSlimani\LaravelEnvWrite\Facades\LaravelEnvWrite;

// Update the environment file with a specific key and value
LaravelEnvWrite::updateEnvironmentFileWith('APP_ENV', 'production');

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-29