2021-11-19 00:15:20 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Setting;
|
|
|
|
|
|
|
|
use Spatie\LaravelSettings\Settings;
|
|
|
|
|
|
|
|
class GeneralSettings extends Settings
|
|
|
|
{
|
|
|
|
|
|
|
|
/** @var array<int, string> */
|
2021-11-19 00:39:34 +01:00
|
|
|
public array $modules;
|
|
|
|
|
|
|
|
public bool $single_view;
|
2021-11-19 00:15:20 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array<int, string>
|
|
|
|
*/
|
2021-11-19 00:39:34 +01:00
|
|
|
public function moduleOptions(): array
|
2021-11-19 00:15:20 +01:00
|
|
|
{
|
|
|
|
return [
|
|
|
|
'bill',
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
public static function group(): string
|
|
|
|
{
|
|
|
|
return 'general';
|
|
|
|
}
|
|
|
|
|
2021-11-19 00:53:19 +01:00
|
|
|
public function hasModule(string $module): bool
|
|
|
|
{
|
|
|
|
return in_array($module, $this->modules);
|
|
|
|
}
|
|
|
|
|
2021-11-19 00:15:20 +01:00
|
|
|
}
|