-
Notifications
You must be signed in to change notification settings - Fork 32
Settings
Roberts Jurkjans edited this page Mar 9, 2018
·
1 revision
Settings are registered in config/settings.php
file.
return [
'key' => 'value'
]
also it is possible to define nested settings, but in this case only outer leaves will have values.
return [
'my_letter' => [
'to' => 'a friend',
'subject' => 'Hello!'
]
]
Settings::has('my_letter.to'); // true
Settings::get('my_letter.to'); // "a friend"
By default all settings will be editable as text values, but it is possible to define specific field type
return [
'my_setting_key' => [
'value' => 'My setting value',
'type' => Arbory\Base\Admin\Form\Fields\CompactRichtext::class
],
]
return [
'my_setting_file' => [
'value' => null,
'type' => Arbory\Base\Admin\Form\Fields\ArboryFile::class
],
'my_setting_image' => [
'value' => null,
'type' => Arbory\Base\Admin\Form\Fields\ArboryImage::class
],
]
return [
'hello' => [
'type' => Arbory\Base\Admin\Form\Fields\Translatable::class,
'value' => [
'type' => Arbory\Base\Admin\Form\Fields\CompactRichtext::class,
'value' => [
'en' => 'Hello',
'lv' => 'Sveiks'
]
]
],
]