2017 © Pedro Peláez
 

library config-writer

Configuration extension

image

sergeymiracle/config-writer

Configuration extension

  • Thursday, March 16, 2017
  • by SergeyMiracle
  • Repository
  • 1 Watchers
  • 5 Stars
  • 172 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 35 Forks
  • 0 Open issues
  • 5 Versions
  • 50 % Grown

The README.md

Laravel 5.4 Config Writer

Write to Laravel Config files and maintain file integrity., (*1)

This library is an extension of the Config component used by Laravel 5.4. It adds the ability to write to configuration files., (*2)

You can rewrite array values inside a basic configuration file that returns a single array definition (like a Laravel config file) whilst maintaining the file integrity, leaving comments and advanced settings intact., (*3)

The following value types are supported for writing: strings, integers, booleans and single-dimension arrays., (*4)

Fork of octobercms\laravel-config-writer., (*5)

Usage Instructions

Install through composer:, (*6)

composer require "sergeymiracle/config-writer"

Add this to app/config/app.php under the 'providers' key:, (*7)

SergeyMiracle\Config\ConfigServiceProvider::class,

You can now write to config files:, (*8)

Config::write(['app.url' => 'http://domain.com']);

app('config')->write(['app.url' => 'http://domain.com']);

Usage outside Laravel

The Rewrite class can be used anywhere., (*9)

$writeConfig = new SergeyMiracle\Config\Rewrite;
$writeConfig->toFile('path/to/config.php', [
    'item' => 'new value',
    'nested.config.item' => 'value',
    'arrayItem' => ['Single', 'Level', 'Array', 'Values'],
    'numberItem' => 3,
    'booleanItem' => true
]);

The Versions

16/03 2017

dev-master

9999999-dev

Configuration extension

  Sources   Download

MIT

The Requires

 

by Avatar SergeyMiracle

laravel write config

16/03 2017

1.2

1.2.0.0

Configuration extension

  Sources   Download

MIT

The Requires

 

by Avatar SergeyMiracle

laravel write config

16/03 2017

1.0.2

1.0.2.0

Configuration extension

  Sources   Download

MIT

The Requires

 

by Avatar SergeyMiracle

laravel write config

16/03 2017

1.0.1

1.0.1.0

Configuration extension

  Sources   Download

MIT

The Requires

 

by Avatar SergeyMiracle

laravel write config

11/08 2014

v1.0

1.0.0.0 http://octobercms.com

Configuration extension

  Sources   Download

MIT

The Requires

 

by Samuel Georges
by Alexey Bobkov

laravel write config october october cms