|
4 vuotta sitten | |
---|---|---|
.. | ||
migrations | 4 vuotta sitten | |
src | 4 vuotta sitten | |
tests | 4 vuotta sitten | |
.gitignore | 4 vuotta sitten | |
.php_cs | 4 vuotta sitten | |
.travis.yml | 4 vuotta sitten | |
LICENSE | 4 vuotta sitten | |
README.md | 4 vuotta sitten | |
composer.json | 4 vuotta sitten | |
phpunit.xml | 4 vuotta sitten | |
scrutinizer.yml | 4 vuotta sitten |
Laravel 5.x Settings help your key value to persist.
$ composer require ibrand/setting -vvv
If your Laravel version below 5.5, you need add the follow line to the section providers
of config/app.php
:
iBrand\Component\Setting\ServiceProvider::class,
If you want to edit default config file, just publish it you app config folder.
php artisan vendor:publish --provider="iBrand\Component\Setting\ServiceProvider"
Execute artisan command
php artisan migrate
If you want to change database table name, you can change config/ibrand/setting.php
after publishing config file.
return [
'table_name' => 'el_system_settings',
'cache' => true,
];
settings(['key'=>'value'])
settings('key')
app('system_setting')->setSetting(['key'=>'value'])
app('system_setting')->getSetting('key')
Set cache=>false
in config/ibrand/setting.php
file.
```php return [
'table_name' => 'el_system_settings',
'cache' => false,
];