定制 davek1312/config 二次开发

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

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

davek1312/config

Composer 安装命令:

composer require davek1312/config

包简介

Bootstraps vlucas/phpdotenv and illuminate/config packages

README 文档

README

Bootstraps vlucas/phpdotenv and illuminate/config packages.

Installation

The package is available on Packagist, you can install it using Composer.

composer require davek1312/config

Configuration

Environment Variables

Copy vendor/davek1312/config/davek1312 folder to your application's root directory and rename config/.env.example to .env. View the .env data format on GitHub. You should not commit your .env file to your version control system.

Register Configuration Files

To register your configuration files view the davek1312\app documentation.

Add your configuration files to the registered configuration folder.

//configuration folder/test.php
<?php 
return [
    'key' => 'value',
];

Usage

Environment Variables

You can use any of the methods from the vlucas/phpdotenv package. You can also use the davek1312_env function.

// If $key is not found in your .env file $default will be returned
davek1312_env($key, $default = null);

Configuration Files

Retrieving configuration values:

use Davek1312\Config\Config;

$config = new Config();
$value = $config->get('tests.key'); //Will return 'value';
$value = $config->get('tests.non_existent'); //Will return NULL;

All other methods for the Config class can be found here.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-02-10

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固