koomai / laravel-config
Database driven configuration for Laravel applications
Installs: 1 935
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 0
Open Issues: 0
Requires
- php: ^7.1
- ext-json: *
- ext-pdo: *
- illuminate/config: 5.8.*
- illuminate/console: 5.8.*
- illuminate/database: 5.8.*
- illuminate/events: 5.8.*
Requires (Dev)
- mockery/mockery: ^1.0
- orchestra/testbench: 3.8.*
- phpunit/phpunit: ^7.5
- scrutinizer/ocular: ^1.5
README
Manage your application configuration in your database.
Dynamic Config allows you to override or add to your application configuration in /config
without redeploying code.
You can also use it as a separate custom configuration manager if you choose not to combine it with Laravel's config.
Installation
You can install the package via composer. Select the appropriate version based on the table below.
composer require koomai/laravel-config
Usage
Register Service Provider
The core service provider is already registered via package discovery.
If you want to combine/override Laravel's config values, you will have to manually register CombinedConfigServiceProvider
in the providers
array in config/app.php
.
Note: It is highly recommended that you cache your config (using artisan config:cache
) if you choose to do the above.
Add config
// Simple key/value for mail configuration php artisan config:add mail username johndoe // Nested key/value for mail configuration php artisan config:add mail from.address johndoe@example.com // Refresh cache by passing the --reset-cache flag php artisan config:add mail username johndoe --reset-cache
Delete config
// Delete a key for mail configuration php artisan config:delete mail username // Delete a nested key for mail configuration php artisan config:delete mail from.address // Pass an empty string to delete all configuration for mail in the database php artisan config:delete mail '' // Refresh cache by passing the --reset-cache flag php artisan config:delete mail username
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.asdfas
Credits
License
The MIT License (MIT). Please see License File for more information.