Download the PHP package dima-bzz/laravel-config-writer without Composer
On this page you can find all versions of the php package dima-bzz/laravel-config-writer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dima-bzz/laravel-config-writer
More information about dima-bzz/laravel-config-writer
Files in dima-bzz/laravel-config-writer
Package laravel-config-writer
Short Description Laravel provider to be able to rewrite configuration
License MIT
Informations about the package laravel-config-writer
Laravel Config Writer
Write to Laravel Config files and maintain file integrity.
This library adds the ability to write to configuration files.
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.
The following value types are supported for writing: strings, integers, booleans and arrays.
Support
This provider is designed to be used in Laravel from 7.4 and 8.0
version.
Setup
Install through composer:
Set a filename to use as default in the .env
file:
You can optionally publish the config file with:
After you've configured everything you should run the command artisan config:clear
or artisan config:cache
.
Introduction
The default is strict write mode. If you wish, you can change it in the configuration file:
Or through the Facade:
Usage the helper
This is the easiest way to write new data to the config file:
Set another config file optional:
Usage the Facade
You can write new data to the config file like this:
Also, you can set certain parameters:
Events
DimaBzz\LaravelConfigWriter\Events\WriteSuccess
This event will be fired if writing to the configuration file was successful. It has the following public properties:
name
: configuration file name
Changelog
Please see CHANGELOG for more information on what has changed recently.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-config-writer with dependencies
illuminate/filesystem Version ^7.0|^8.0
illuminate/config Version ^7.0|^8.0
illuminate/support Version ^7.0|^8.0