crcms/file-config 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

crcms/file-config

Composer 安装命令:

composer require crcms/file-config

包简介

file config put and read

README 文档

README

Sets the storage format of the configuration file

Example

update file_config.php

'files'=>[
    /tmp/crcms,
    // Set up other parsing drivers
    /tmp/crcms => \CrCms\FileConfig\Drives\SerializeConfig::class,
    
],

'default_drive'=>\CrCms\FileConfig\Drives\DefaultConfig::class,

put

file_config([
    crcms.a=>'a',
    crcms.b=>'b'
])

//or

file_config()->put('crcms.a',['k'=>'k','s'=>'s'])

get

file_config('crcms.a')

all

file_config('crcms')

destroy

file_config()->destroy('crcms.a')

0.0.2 above the new load method

Example test.php
key1=>value1
key2=>value2

//get all
file_config()->load('/path/test.conf')->all('test')

0.0.3 Add multiple dot depth support

file_config()->load('/path/test.conf')->get('test.depth1.depth2.0')

0.0.4 Overwrite all configurations

file_config(['crcms'=>[1,2,3]])

//or

file_config()->put('crcms',['key'=>[1,'value']])

Install

You can install the package via composer:

composer require crcms/file-config

Laravel

Modify config / app.php

'providers' => [
    CrCms\FileConfig\FileConfigServiceProvider::class,
]


'aliases' => [
    'FileConfig' => \CrCms\FileConfig\Facades\FileConfig::class
],

If you'd like to make configuration changes in the configuration file you can pubish it with the following Aritsan command:

php artisan vendor:publish --provider="CrCms\FileConfig\FileConfigServiceProvider"

Laravel Testing

phpunit ./tests/Config

License

MIT

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-04-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固