pixeo / laravel-settings
Simple persisting settings package for a Laravel application
Installs: 2 942
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: ^7.2|^8.0
- illuminate/database: >=5.8
- illuminate/support: >=5.8
Requires (Dev)
- orchestra/testbench: ~3.3.0|~3.4.2|^3.5.0
- phpunit/phpunit: ^7.0
README
Persist your settings in the database
Installation
You can install the package via composer:
composer require pixeo/laravel-settings
The package will automatically register itself.
You can publish the config-file with:
php artisan vendor:publish --provider="Pixeo\Settings\SettingServiceProvider" --tag="config"
This is the contents of the published config file:
<?php return [ /* * The model that is used to fetch the settings */ 'model' => Pixeo\Settings\Setting::class, /** * The cache key the package will use */ 'cache_key' => 'pixeo.settings', ];
Usage
\Pixeo\Settings\Setting::create(['key' => 'foo', 'value' => 'bar']); echo setting('foo'); // => bar
Testing
composer test
Credits
License
The MIT License (MIT). Please see License File for more information.