Files
wticreatorstudio/Modules/StudioPlus/Services/Settings.php
T
2024-02-12 22:54:20 -05:00

28 lines
514 B
PHP

<?php
namespace Modules\StudioPlus\Services;
use Modules\StudioPlus\Entities\Setting;
class Settings
{
public function getOption($key)
{
return Setting::where('key', $key)->first();
}
public function setOption($key, $value)
{
Setting::updateOrCreate(
[
'key' => $key,
],
[
'value' => $value,
]
);
return Setting::where('key', $key)->first();
}
}