2023-02-05 17:20:55 +00:00
|
|
|
<?php
|
|
|
|
|
2023-02-06 20:16:54 +00:00
|
|
|
namespace App\Settings;
|
2023-02-05 17:20:55 +00:00
|
|
|
|
|
|
|
use Spatie\LaravelSettings\Settings;
|
|
|
|
|
|
|
|
class TicketSettings extends Settings
|
|
|
|
{
|
|
|
|
public bool $enabled;
|
2023-02-09 21:34:34 +00:00
|
|
|
|
2023-02-05 17:20:55 +00:00
|
|
|
public string $notify;
|
|
|
|
|
|
|
|
public static function group(): string
|
|
|
|
{
|
|
|
|
return 'ticket';
|
|
|
|
}
|
2023-02-09 21:34:34 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Summary of optionTypes
|
|
|
|
* Only used for the settings page
|
|
|
|
* @return array<array<'type'|'label'|'description'|'options', string|bool|float|int|array<string, string>>>
|
|
|
|
*/
|
|
|
|
public static function getOptionInputData()
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'enabled' => [
|
|
|
|
'label' => 'Enabled',
|
|
|
|
'type' => 'boolean',
|
|
|
|
'description' => 'Enable or disable the ticket system.',
|
|
|
|
],
|
|
|
|
'notify' => [
|
|
|
|
'label' => 'Notify',
|
|
|
|
'type' => 'select',
|
|
|
|
'description' => 'Who will receive an E-Mail when a new Ticket is created.',
|
|
|
|
'options' => [
|
|
|
|
'admin' => 'Admins',
|
|
|
|
'moderator' => 'Moderators',
|
|
|
|
'all' => 'Admins and Moderators',
|
|
|
|
'none' => 'Nobody',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
];
|
|
|
|
}
|
|
|
|
}
|