定制 inoplate/config 二次开发

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

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

inoplate/config

Composer 安装命令:

composer require inoplate/config

包简介

Inoplate configuration repository

README 文档

README

Inoplate database configuration is a PHP package to load configuration from database.

Example

$config->has($key) // determine if config has value
$config->get($key, $default); // retrieve config value from database
$config->all() // retrieve all configuration
$config->set($key, $value, $cacheExpiration); // set config value to database and automatically cached. Default cache expiration is 10 minutes

Instalation

composer install inoplate/config

Integration

Currently this package only provide integration to Laravel ^5.3. To integrate, please follow the steps described below.

1. Add Inoplate\Config\Laravel\ConfigServiceProvider to your providers configuration.
2. Migrate your database.
3. Change the bootstrappers on your kernel, this file defaultly located in app/Http/Kernel.php and app/Console/Kernel.php.
4. Look at their parent class, we need to overrider the bootstrappers property.
  * For Http located at vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php
  * For Console loacated at vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php
5. Copy and paste the bootstrappers and change 'Illuminate\Foundation\Bootstrap\LoadConfiguration' with 'Inoplate\Config\Laravel\LoadConfiguration'
6. Use as usual

Please Note.

1. This package will only persist config via set() call. Call via push(), prepend() and ArrayAccess will not persisted.
2. This package will do necessary cache under the hood
3. Use fully qualified name such as "app.name" and it's value. This package is not supporting nested key such as [app => ['name' => 'My Application', 'site' => 'https://mysites.com']] yet

Running the tests

This package using phpspec as specification testing and PHPUnit as integration testing. To run phpspec simply run vendor/bin/phpspec run. To run laravel integration test run vendor/bin/phpunit -c tests/laravel/phpunit.xml.

Contribution

Thank you for considering contributing to the this package. Just create pull request to and elaborate your purpose. We can discuss about the coding standart, branching strategy, etc.

License

This project is licensed under the MIT License

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-08-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固