first&last

This commit is contained in:
sbb45
2026-03-20 15:47:17 +05:00
commit d6441abdd2
230 changed files with 20367 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Services;
use App\Models\Setting;
class SettingsService
{
public function get(string $key, mixed $default = null): mixed
{
return Setting::getValue($key, $default);
}
public function set(string $key, mixed $value, string $type = 'string'): Setting
{
return Setting::setValue($key, $value, $type);
}
public function defaultSlaHours(): int
{
return (int) $this->get('default_sla_hours', 24);
}
public function emailNotifications(): array
{
$value = $this->get('email_notifications', []);
return is_array($value) ? $value : [];
}
}