Download the PHP package benrowe/laravel-config without Composer
On this page you can find all versions of the php package benrowe/laravel-config. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-config
Laravel Config
A Laravel runtime configuration handler that supports hierarchical configuration, however when stored, the data is flattened to basic key/value pairs (this allows for more possible storage options)
Features
- Ability to store the configuration data into any persistent data store (file, db, etc).
- Provided Storage Adapters include Db, File, Redis.
- Dot notation syntax for configuration hierarchy.
- Values can be simple strings, or arrays of strings.
- Modifier support. Modifers can be registered to manipulate the value at runtime. (aka storing json, datetimes, booleans, etc).
- ServiceProvider included to configure the component based on the supplied configuration
- Facade support
Installation
Install the library using composer. Add the following to your composer.json
:
Now run the install
command.
This will provide access to the component via PSR-4. To configure the package as a laravel service, the service provider must be registered with the provided ServiceProvider.
Configuring Laravel
Once the package has been installed via composer, you need to register the service provider. To do this, edit your config/app.php
and add a new option under the providers
key.
Additionally you can register the provided facade.
With the service provider registered, this will give access to the config component, however it is not configured to persist any changes you make to the config. To do this, you need to publish the provided config file.
This will publish a config.php
file into your config
directory. At this point you will need to edit the file and setup how you want to persist your configuration.
Additionally if you plan to store your configuration in a database (such as mysql, etc) you will need to publish the migration which stores the config schema