ctrlpanel/app/Settings/TicketSettings.php
2023-05-08 14:42:46 +02:00

51 lines
1.3 KiB
PHP

<?php
namespace App\Settings;
use Spatie\LaravelSettings\Settings;
class TicketSettings extends Settings
{
public bool $enabled;
public ?string $information;
public static function group(): string
{
return 'ticket';
}
/**
* Summary of validations array
* @return array<string, string>
*/
public static function getValidations()
{
return [
'enabled' => 'nullable|string',
'information' => 'nullable|string',
];
}
/**
* 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 [
'category_icon' => 'fas fa-ticket-alt',
'enabled' => [
'label' => 'Enabled',
'type' => 'boolean',
'description' => 'Enable or disable the ticket system.',
],
'information' => [
'label' => 'Ticket Information',
'type' => 'textarea',
'description' => 'Message shown on the right side when users create a new ticket.',
],
];
}
}