mirror of
https://github.com/Bigherollc/wticreatorstudio.git
synced 2026-07-14 09:01:42 -04:00
28 lines
514 B
PHP
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();
|
|
}
|
|
}
|