klaravel / settings
Laravel database settings manager.
Installs: 5 765
Dependents: 0
Suggesters: 0
Security: 0
Stars: 4
Watchers: 0
Forks: 0
Open Issues: 0
Requires
- illuminate/cache: 5.*
- illuminate/console: 5.*
- illuminate/support: 5.*
Requires (Dev)
- friendsofphp/php-cs-fixer: 1.12.*
- laravel/framework: 5.3.*
- mockery/mockery: 0.9.*
- orchestra/testbench: ^3.3
- phpro/grumphp: 0.9.*
- phpunit/phpunit: 5.6.*
This package is not auto-updated.
Last update: 2024-10-26 20:32:13 UTC
README
This module allow you to store settings into database with easy commands. You can store as many as settings and it will fetch settings with caching so only one database query and all settings will store into cache.
Installation:
-
Run
composer require klaravel/settings
in console to install this module
-
Open
config/app.php
and inproviders
section add:Klaravel\Settings\ServiceProvider::class,
in
aliases
section add:'Setting' => Klaravel\Settings\SettingsFacade::class,
-
Now generate the Settings migration:
php artisan settings:migration // for migrate database php artisan migrate
You will see migration file on you
/database/migrations/
folder.
Usage:
Here's a quick example that shows how to use Setting
:
Setting::put('key', 'value'); // Insert settings into database Setting::set('key', 'value'); // Insert settings into database Setting::get('key'); // Get settings from database Setting::has('key'); // Check key exits in database Setting::forget('key'); // Delete key and value from database