2017 © Pedro Peláez
 

library laravel-config-writer

Write to Laravel Config files and maintain file integrity. Support Laravel 5.3+

image

axdlee/laravel-config-writer

Write to Laravel Config files and maintain file integrity. Support Laravel 5.3+

  • Thursday, April 20, 2017
  • by axdlee
  • Repository
  • 2 Watchers
  • 3 Stars
  • 992 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 2 Open issues
  • 4 Versions
  • 18 % Grown

The README.md

Laravel Config Writer For Laravel 5.3 + 5.4+

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

This library can support Lravel 5.3+., (*2)

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

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., (*4)

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

Usage Instructions

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

Axdlee\Config\ConfigServiceProvider::class,

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

Config::write('app.url', 'http://xdlee.com');

Usage outside Laravel

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

$writeConfig = new Axdlee\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

20/04 2017

dev-master

9999999-dev http://xdlee.com

Write to Laravel Config files and maintain file integrity. Support Laravel 5.3+

  Sources   Download

MIT

The Requires

 

by Avatar axdlee

20/04 2017

1.0.2

1.0.2.0 http://xdlee.com

Write to Laravel Config files and maintain file integrity. Support Laravel 5.3+

  Sources   Download

MIT

The Requires

 

by Avatar axdlee

20/04 2017

1.0.1

1.0.1.0 http://xdlee.com

Write to Laravel Config files and maintain file integrity. Support Laravel 5.3+

  Sources   Download

MIT

The Requires

 

by Avatar axdlee

20/04 2017

1.0.0

1.0.0.0 http://xdlee.com

Write to Laravel Config files and maintain file integrity. Support Laravel 5.3+

  Sources   Download

MIT

The Requires

 

by Avatar axdlee