Settings
use Voyager\Admin\Contracts\Plugins\GenericPlugin;
use Voyager\Admin\Contracts\Plugins\Features\Provider\Settings;
class MyPlugin implements GenericPlugin, Settings
{
public function provideSettings(): array
{
return [
[
'type' => 'text',
'group' => 'My group',
'name' => 'My setting',
'key' => 'my_setting',
'value' => 'Value',
'translatable' => false,
'info' => 'This is a setting provided by a plugin',
'options' => [],
'validation' => [],
],
[
'type' => 'text',
'group' => 'My group',
'name' => 'My second setting',
'key' => 'my_second_setting',
'value' => 'Value',
'translatable' => false,
'info' => 'This is another setting provided by a plugin',
'options' => [],
'validation' => [],
]
];
}
}Last updated
Was this helpful?