|
@@ -5,6 +5,7 @@ namespace App\Repositories;
|
|
|
use App\Models\Config;
|
|
|
use App\Models\Enums\ConfigGroup;
|
|
|
use App\Repositories\Enums\EmailConfigFieldEnum;
|
|
|
+use App\Repositories\Enums\BrowserConfigFiledEnum;
|
|
|
|
|
|
class ConfigRepository
|
|
|
{
|
|
@@ -13,6 +14,10 @@ class ConfigRepository
|
|
|
return self::getConfigItem(ConfigGroup::EMAIL->value, EmailConfigFieldEnum::OPEN_EMAIL_NOTIFICATION->value) == "on";
|
|
|
}
|
|
|
|
|
|
+ public static function openBrowserNotification(): bool{
|
|
|
+ return self::getConfigItem(ConfigGroup::BROWSER->value, BrowserConfigFiledEnum::OPEN_BROWSER_NOTIFICATION->value) == "on";
|
|
|
+ }
|
|
|
+
|
|
|
protected static function getConfigItem(string $group, string $key)
|
|
|
{
|
|
|
$config = Config::query()->where('group', $group)->where("key", $key)->first();
|